From: <koen.news@koca.be>
To: netfilter@vger.kernel.org
Subject: Re: multiple external IP's - virtual NIC - DNAT problems
Date: Mon, 01 Feb 2010 09:43:11 +0100 [thread overview]
Message-ID: <51f1a6a7bd4bbe42e8619e29b7f3aec6@mail.priorweb.be> (raw)
In-Reply-To: <alpine.DEB.2.00.1001301414410.16952@aurora.sdinet.de>
> Not pre-up, put them in up / post-up
>
> You can also use eth0:1 eth0:2 interface definitions in debian
> /etc/network/interfaces and use "-i eth0 -d $ip" in your firewall
> config.
>
> The eth0:X interfaces are not really network interfaces, they are just
> secondary ip addresses on the base interface with a different label
> attached to them for ifconfig backward compatibility.
>
> Example:
> ifconfig eth2:2 192.168.19.123 up
> ip addr show dev eth2
> -> inet 192.168.19.123/24 brd 192.168.19.255 scope global secondary
eth2:2
>
> ip addr add 192.168.19.124/24 dev eth2
> ip addr show dev eth2
> -> inet 192.168.19.123/24 brd 192.168.19.255 scope global secondary
eth2:2
> -> inet 192.168.19.124/24 scope global secondary eth2
>
>
> c'ya
> sven
This is exactly what I needed. Everything works now as expected.
Sidenote: I first created an extra address with:
ip addr add 192.168.19.124/24 dev eth2
And checked that is was there. THen I put everything in the post-up
command including the one I already did.
invoke-rc.d networking restart didn't activate the other addressess.
I remove the first one:
ip addr del 192.168.19.124/24 dev eth2
then invoke-rc.d networking restart worked.
Many thanks.
Koen
prev parent reply other threads:[~2010-02-01 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-29 7:15 multiple external IP's - virtual NIC - DNAT problems koen.news
2010-01-29 14:46 ` Mike Wright
2010-01-29 17:22 ` koen.news
2010-01-29 18:36 ` Mike Wright
2010-01-30 13:22 ` Sven-Haegar Koch
2010-02-01 8:43 ` koen.news [this message]
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=51f1a6a7bd4bbe42e8619e29b7f3aec6@mail.priorweb.be \
--to=koen.news@koca.be \
--cc=netfilter@vger.kernel.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