Re: [Vserver] Network problem

From: Jairo Enrique Serrano Castaņeda <jairo.serrano_at_gmail.com>
Date: Mon 19 Dec 2005 - 18:00:48 GMT
Message-ID: <4ac96a220512191000o3b68810bh@mail.gmail.com>

>
>
> not unexpected, unless your router (172.16.3.16)
> also masquerades private addresses like 192.168.1.2

my unusual router are 172.16.3.16

> how do it?
>
> simple:
>
iptables -t nat -I POSTROUTING -s 192.168.1.2 -j SNAT --to 172.16.3.102

i have a "real" network ip of my lan... 172.16.3.103, i do a ip alias

# Original
iface eth0 inet static
        address 172.16.3.102
        netmask 255.255.255.0
        network 172.16.3.0
        broadcast 172.16.3.255
        gateway 172.16.3.16
        # dns-* options are implemented by the resolvconf package, if
installed
        dns-nameservers 200.106.128.4

#alias
iface eth0:1 inet static
        address 172.16.3.103
        netmask 255.255.255.0
        network 172.16.3.0
        broadcast 172.16.3.255
        gateway 172.16.3.16
        dns-nameservers 200.106.128.4

in the virtual server have:
root@sv1:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
172.16.3.0 * 255.255.255.0 U 0 0 0 eth0
default 172.16.3.16 0.0.0.0 UG 0 0 0 eth0
default 172.16.3.16 0.0.0.0 UG 0 0 0 eth0

in the Host server have:
savio@sv0:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
localnet * 255.255.255.0 U 0 0 0 eth0
default 172.16.3.16 0.0.0.0 UG 0 0 0 eth0
default 172.16.3.16 0.0.0.0 UG 0 0 0 eth0

looks equal...

the two ips are functional...
------------------------------------------------------------------------------------------------

savio@sv0:~$ ping 172.16.3.102
PING 172.16.3.102 (172.16.3.102) 56(84) bytes of data.
64 bytes from 172.16.3.102: icmp_seq=1 ttl=64 time=0.023 ms
64 bytes from 172.16.3.102: icmp_seq=2 ttl=64 time=0.007 ms
--- 172.16.3.102 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.007/0.015/0.023/0.008 ms

------------------------------------------------------------------------------------------------

savio@sv0:~$ ping 172.16.3.103
PING 172.16.3.103 (172.16.3.103) 56(84) bytes of data.
64 bytes from 172.16.3.103: icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from 172.16.3.103: icmp_seq=2 ttl=64 time=0.008 ms
--- 172.16.3.103 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.008/0.013/0.018/0.005 ms

------------------------------------------------------------------------------------------------

but not resolv functional...

> any fault in the config???
>
> no, looks fine, although I'd add a prefix (e.g.
> containing 24) to the interfaces/0
>
> HTH,
> Herbert
>
> > --
> > Jairo Enrique Serrano Castaņeda
> > Ingeniero de Sistemas UTB
> > http://www.jsnat.com
> > http://www.drupal.org.es
>
> > _______________________________________________
> > Vserver mailing list
> > Vserver@list.linux-vserver.org
> > http://list.linux-vserver.org/mailman/listinfo/vserver
>
>

--
Jairo Enrique Serrano Castaņeda
Ingeniero de Sistemas UTB
http://www.jsnat.com
http://www.drupal.org.es

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Mon Dec 19 18:01:25 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 19 Dec 2005 - 18:01:30 GMT by hypermail 2.1.8