Re: [Vserver] Network problem

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Mon 19 Dec 2005 - 16:24:23 GMT
Message-ID: <20051219162423.GB8047@MAIL.13thfloor.at>

On Mon, Dec 19, 2005 at 10:50:47AM -0500, Jairo Enrique Serrano Castaņeda wrote:
> Hello, this its my first message to the list...
>
> im use Ubuntu server edition, and have a "Linux sv0 2.6.12-vserver #1 SMP
> Thu Dec 15 15:46:41 COT 2005 x86_64 GNU/Linux" recently compiled.
>
> mi network interface declared -->
> 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-nameservers 200.106.128.4
> ------------------------
> savio@sv0:/usr/src$ cat /etc/vservers.conf
> # Configuration file for the vservers service
> # BACKGROUND=yes
> # start the vservers on tty9, in background so the rest of the
> # boot process end early
> BACKGROUND=no
> ------------------------
> savio@sv0:/usr/src$ cat /etc/vservers/newvserver-vars
> # Configuration file for newvserver
> # See man newvserver for the variables that you can set here.
> #/etc/vserver/newvserver-vars
>
> # Architecture: overide on non-Debian host such as Redhat otherwise dpkg
> # will detect whether we are i386/powerpc/sparc/etc
> #ARCH=""
>
> # Which debian distribution (Warning. unstable and testing distributions
> # change frequently so you can not expect it to work out of the box).
> DIST="breezy"
>
> # Local or nearest location of a debian mirror (must include the /debian)
> MIRROR="http://archive.ubuntu.com/ubuntu/"
>
> # Default network interface for vservers:
> INTERFACE="eth0"
>
> # Package caching
> PKGCACHE=1
> ---------------------------------------
> savio@sv0:/usr/src$ cat /etc/vservers/sv1/interfaces/0/dev
> eth0
> ---------------------------------------
> savio@sv0:/usr/src$ cat /etc/vservers/sv1/interfaces/0/ip
> 192.168.1.2
> ---------------------------------------- kernel config
> #
> # Linux VServer
> #
> CONFIG_VSERVER_LEGACY=y
> # CONFIG_VSERVER_LEGACY_VERSION is not set
> # CONFIG_VSERVER_NGNET is not set
> CONFIG_VSERVER_PROC_SECURE=y
> CONFIG_VSERVER_HARDCPU=y
> CONFIG_VSERVER_HARDCPU_IDLE=y
> # CONFIG_INOXID_NONE is not set
> # CONFIG_INOXID_UID16 is not set
> # CONFIG_INOXID_GID16 is not set
> CONFIG_INOXID_UGID24=y
> # CONFIG_INOXID_INTERN is not set
> # CONFIG_INOXID_RUNTIME is not set
> # CONFIG_XID_TAG_NFSD is not set
> # CONFIG_VSERVER_DEBUG is not set
> --------------------------------------------
>
> root@sv1:/# ping 66.94.234.13
> PING 66.94.234.13 (66.94.234.13) 56(84) bytes of data.
>
> --- 66.94.234.13 ping statistics ---
> 2 packets transmitted, 0 received, 100% packet loss, time 1000ms
>
> root@sv1:/# ping google.com
>
> root@sv1:/# vi /etc/resolv.conf
> root@sv1:/# cat /etc/resolv.conf
> #search unitecnologica.edu.co
> nameserver 200.106.130.235
> root@sv1:/# cat /etc/network/interfaces
> # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
> # /usr/share/doc/ifupdown/examples for more information.
> root@sv1:/# ifconfig
> eth0 Link encap:Ethernet HWaddr 00:11:25:1E:76:BA
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:5483 errors:0 dropped:0 overruns:0 frame:0
> TX packets:746 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:568480 (555.1 KiB) TX bytes:115507 (112.7 KiB)
> Interrupt:24
>
> --------------------------------------------
> i have dns problems in the virtual server 1,

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

> how do it?

simple:

 iptables -t nat -I POSTROUTING -s 192.168.1.2 -j SNAT --to 172.16.3.102

> 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

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Mon Dec 19 16:24:40 2005

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