Re: virtual nic
> Hello,
>
> is it possible to set up a virtual NIC and network? I would like to do
> this:
> eth0 <- iptable filter -> virtual <- more iptables -> rest of the system.
>
> I want to filter out some traffic because I only want to monitor some of
> the traffic.
see /usr/src/linux/Documentation/networking/alias.txt
the most interesting part is:
o For IP aliasing you must have IP_ALIAS support included by static
linking.
o Alias creation.
Alias creation is done by 'magic' iface naming: eg. to create a
200.1.1.1 alias for eth0 ...
# ifconfig eth0:0 200.1.1.1 etc,etc....
~~ -> request alias #0 creation (if not yet exists)
for eth0
and routing stuff also ...
# route add -host 200.1.1.1 dev eth0:0 (if same IP network as
main device)
# route add -net 200.1.1.0 dev eth0:0 (if completely new network
wanted
for eth0:0)
o Alias deletion.
Also done by shutting the interface down:
# ifconfig eth0:0 down
~~~~~~~~~~ -> will delete alias
Reply to:
- References:
- virtual nic
- From: Sebastiaan <S.Breedveld@ITS.TUDelft.NL>