Hi,

this is a suggested fix for bug #426796: if the host uses 127.0.0.1 as
a nameserver, this cannot be used as a nameserver inside the
container.

One (partial) solution would be, to replace 127.0.0.1 with the host
address on the interface given for the vserver subnet.  This mewthod
could be implemented by the following patch:

----------------------------------------------------------------------
--- /usr/sbin/newvserver.orig   2007-04-10 04:49:31.000000000 +0100
+++ /usr/sbin/newvserver        2007-08-19 16:59:27.000000000 +0100
@@ -477,7 +477,10 @@
 EOF
 
 # grab DNS servers from the host-server for `resolv.conf'
-(echo search $VDOMAIN ; grep '^nameserver' /etc/resolv.conf) \
+HOST_IP=$(ip -o addr show dev $INTERFACE primary scope global | \
+          sed -n 's;.*inet \([^/]*\)/.*;\1;p')
+(echo search $VDOMAIN;
+ grep '^nameserver' /etc/resolv.conf | sed "s/127.0.0.1/$HOST_IP/") \
     > "$VROOTDIR/$VHOST/etc/resolv.conf"
 
 # If there is a proxy server statement in-use in the Host server, copy it 
across
----------------------------------------------------------------------

This will work as long as the hosts nameserver listens on $INTERFACE.

I hope this helps,
Jochen
-- 
http://seehuhn.de/

Attachment: signature.asc
Description: Digital signature

Reply via email to