-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Victor, What is the status of this thread? Did manage to sort out the problem? Is it just me who missed the rest of the thread? Cheers, - -Nikolay Daniel Hokka Zakrisson wrote: > Víctor Román Archidona wrote: > Hi, > > I'm using several VPS on the same machine with multiple public IP > addresses. Both host and VPS machines has network conectivity and reachs > the public Internet via eth0, which has all the public IPs. > > Now I'm building "private" VPS on 172.16.1.0/24 network segment. If I > give 172.16.1.1 to HOST and 172.16.1.10 to a private VPS, they both can > see each other. > > The problem comes when I try to reach the public internet from the > private VPS on the private subnet. I also enabled forwarding and > postrouting on the host: > > echo 1 > /proc/sys/net/ipv4/ip_forward > >> This is not needed. Guests aren't routed /through/ the host, they're >> routed /by/ the host. > > iptables -t nat -A POSTROUTING -s 172.16.1.0/24 ! -d 172.16.1.0/24 -j > SNAT --to A.B.C.D > > (being A.B.C.D the public IP address). > > The VPS has the following interfaces configuration: > ~ /etc/vservers/private/interfaces/0/dev > lo > ~ /etc/vservers/private/interfaces/0/prefix > 8 > ~ /etc/vservers/private/interfaces/0/ip > 127.0.0.1 > >> I hope you only have this for one guest... but even then it shouldn't be >> needed with a properly configured kernel and non-retarded applications. > > ~ /etc/vservers/private/interfaces/1/dev > eth0 > ~ /etc/vservers/private/interfaces/1/prefix > 24 > ~ /etc/vservers/private/interfaces/1/ip > 171.16.1.10 > > Can anyone help me or give some hint about why I cannot reach the public > Internet? > >> What kernel? Using a private address for the first interface is a possible >> reason if you're using an old kernel. > > Regards, >> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEVAwUBSCwycjFLYVOGGjgXAQLJhggA1loKyAoujnS5AXTlnTWNkOW7a3/24nSA 26rgdDCs2JERI62Ad8DbfTpReJRnH7fNqYcYjVlFSazOsI0S6mItlYHzsiBtAyGK ADgluZLHk4+CinvjE+uz5N+ZWAgFFwvkKwFxCpgV5b5Uwdzm+xdDsZ43w0c7cpRD 33vmxYm5B1jJFlQG81tujO+OLpHFOK2ZmmodYOdA+hUJ4AtFkky18BDRR/XRo1U9 MNtHoQyffh0rPtiNjfz8cUpwAw0cKLpqwCS0kyJWmHR1r3lmmd69nr7eJw2VkVxZ cWXg+gdnlQPh2DRmcQCw4KMOvMN5q5WuYMs84F0OcqW6xEmmFo+LNQ== =eb9A -----END PGP SIGNATURE-----