Re: [vserver] Networking setup question

From: Matt Paine <matt_at_mattsoftware.com>
Date: Tue 17 Mar 2009 - 00:14:29 GMT
Message-ID: <49BEEB65.3000600@mattsoftware.com>

Hi Again...

> what i personally do is to create a "virtual" network card and let the
> VServer guests listen on that interface.
> you can just add an extra interface like this
> (in debian you add it in /etc/network/interfaces)
> auto dummy0
> iface dummy0 inet static
> address 192.168.1.1
> netmask 255.255.255.0
>
> in order to be reachable i use shorewall to route the trafic i want
> from external IP on eth0 to the VServer guest IP on dummy0.

I'm using CentOS - so I added the dummy interface details to
/etc/sysconfig/network-scripts/ifcfg-dummy0 and off I went - no dramas.

I am still not getting traffic routed from my guest, in your example you
use Shorewall - having never setup this solution I am cautiously
hesitant to set this up on my production box (although I have seen RPM's
available for it, I am still hesitant until I have had experience with
it - I would hate my remote production box to become unreachable for a
config issue).

Does anyone have a set of route/iptables rules I might be able to add to
get the guest to achieve access to the outside world?

Thankyou again for any hints :)

......
(output from route below if that helps)
......

Matt
mattsoftware.com

(route from host)
[root@vps local]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.0.1.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
121.50.218.160 0.0.0.0 255.255.255.248 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.255.0.0 U 0 0 0
dummy0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0
dummy0
0.0.0.0 121.50.218.161 0.0.0.0 UG 0 0 0 eth0

(route from guest)
bash-3.2# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.0.1.1 0.0.0.0 255.255.255.255 UH 0 0 0 *
121.50.218.160 0.0.0.0 255.255.255.248 U 0 0 0 *
10.0.0.0 0.0.0.0 255.255.0.0 U 0 0 0
dummy0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0
dummy0
0.0.0.0 0.0.0.0 0.0.0.0 UG 0 0 0 *
Received on Tue Mar 17 00:14:48 2009

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 17 Mar 2009 - 00:14:52 GMT by hypermail 2.1.8