Quoth Christian Parpart (on Friday, the 21st of October):
hi,
is this even possible?
I mean, I want somethiing like lo/loopback but definitely *not* for
127.0.0.0/8, instead, I'd like to configure a virtual networking device
having e.g. configured for 192.168.42.1/24 (on a server that has only *one*
single physical networking interface with a public IP), so, that I can use
this subnet on the virtual networking interface to let VPN clients connect to
it.
You can assign a second address (alias) to your existing interface.
It will be named eth0:X and can have any address you wish
Gentoos /etc/conf.d/net has that possibility already built in, just ad a
second line to your existing setup like so:
config_eth0=(
"84.115.XXX.XXX netmask 255.255.255.0"
"192.168.1.1 netmask 255.255.255.0"
)
and restart networking.
Minor drawback though: you cannot address the aliased interface with
iptables, iptables -i/-o will only take the physical network device.
Filtering via IP still works though.
The other possibility is to use the dummy module (config option
CONFIG_DUMMY=m under Device drivers -> Network device support)
which will create as many virtual networking interfaces as you want,
called dummy0, dummy1 ...
(modprobe dummy numdummies=N, ifconfig dummy)
HTH,
Peter
--
"I do not think the way you think I think."
-- Kai, last of the Brunnen G
--
[email protected] mailing list