From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Howto setup tunnel in gentoo scripts
Date: Tue, 30 May 2006 21:58:56 +0100 [thread overview]
Message-ID: <20060530215856.57809678@hactar.digimed.co.uk> (raw)
In-Reply-To: <447CAB0E.9030405@xmedia.sk>
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
On Tue, 30 May 2006 22:29:02 +0200, Norbert Kamenicky wrote:
> to establish gre tunnel, these commands have to be run:
> (e.g. from local.start)
>
> # ip tunnel add vpn0 mode gre remote 1.1.1.1 local 2.2.2.2 dev eth0
> # ip addr add 3.3.3.3 dev vpn0
> # ip link set vpn0 mtu 1420 up
>
> Does anybody know, how to put it into /etc/conf.d/net ?
> I didn't succeed yet, 'cause I found no clear doc.
I take it you want these run when the interface comes up? If so, put them
in the postup() function in /etc/conf.d/net. Something like
postup() {
if [ ${IFACE} == "eth0" ]; then
ip tunnel add vpn0 mode gre remote 1.1.1.1 local 2.2.2.2 dev eth0
ip addr add 3.3.3.3 dev vpn0
ip link set vpn0 mtu 1420 up
fi
}
You may need to put the shutdown commands in predown().
See /etc/conf.d/net.example for more info. I use ~arch, so I don't know
for sure how much of this works in the current stable baselayout, but
I've been using these functions for over a year, so I guess it's in
stable by now.
--
Neil Bothwick
No maintenance: Impossible to fix.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-05-30 21:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-30 20:29 [gentoo-user] Howto setup tunnel in gentoo scripts Norbert Kamenicky
2006-05-30 20:58 ` Neil Bothwick [this message]
2006-05-30 22:27 ` Norbert Kamenicky
2006-05-30 23:15 ` Neil Bothwick
2006-05-31 22:40 ` [gentoo-user] Re: [OT] " Norbert Kamenicky
2006-05-31 23:00 ` Neil Bothwick
2006-06-01 17:17 ` Norbert Kamenicky
2006-06-01 17:55 ` Neil Bothwick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060530215856.57809678@hactar.digimed.co.uk \
--to=neil@digimed.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox