OpenVZ Forum


Home » General » Support » *SOLVED* DNS lookup not working inside the VPS
*SOLVED* DNS lookup not working inside the VPS [message #11889] Wed, 11 April 2007 00:25 Go to next message
bfullmer is currently offline  bfullmer
Messages: 7
Registered: April 2007
Junior Member
I created the VPS. The VPS can ping outside IP addresses, but fails to find domains. However on the Node side, both are possible. I configured the VPS with valid nameserver ip addresses. The IP address can be reached from inside the VE. What am I missing?

[Updated on: Fri, 20 April 2007 15:21]

Report message to a moderator

Re: DNS lookup not working inside the VPS [message #11896 is a reply to message #11889] Wed, 11 April 2007 07:22 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Is a "firewall" enabled on your hostnode (VE0) ?
Re: DNS lookup not working inside the VPS [message #11918 is a reply to message #11889] Wed, 11 April 2007 21:32 Go to previous messageGo to next message
bfullmer is currently offline  bfullmer
Messages: 7
Registered: April 2007
Junior Member
That was it! Very Happy Thank you.
Re: DNS lookup not working inside the VPS [message #12136 is a reply to message #11918] Wed, 18 April 2007 07:29 Go to previous messageGo to next message
bfullmer is currently offline  bfullmer
Messages: 7
Registered: April 2007
Junior Member
Okay.

I rebuilt the box. Again I have the same issue. I can ping the ip and domain from node. But can not resolve dns inside the VPS. I believe I have disabled the firewall on the Node. This is very frustrating! It was working before, but now it doesn't.


[root@ut-ve0001 ~]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: mangle filter [ OK ]
Unloading iptables modules: [FAILED]
[root@ut-ve0001 ~]#


What do I do next?
Re: DNS lookup not working inside the VPS [message #12139 is a reply to message #12136] Wed, 18 April 2007 08:04 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
How have you configured DNS server for your VE? By vzctl command or just from inside VE by modifying /etc/resolv.conf?

Thanks.
icon13.gif  Re: DNS lookup not working inside the VPS [message #12167 is a reply to message #12139] Wed, 18 April 2007 18:11 Go to previous messageGo to next message
bfullmer is currently offline  bfullmer
Messages: 7
Registered: April 2007
Junior Member
# vzctl create 101 --config vps.12
# vzctl set 101 --onboot yes --save
# vzctl set 101 --hostname vps1001.tele-bridge.net --save
# vzctl set 101 --ipadd 209.41.77.227 --save
# vzctl set 101 --nameserver 216.194.124.21 --save
# vzctl start 101



from the node:
[root@ut-ve0001 ~]# ping yahoo.com
PING yahoo.com (66.94.234.13) 56(84) bytes of data.
64 bytes from w2.rc.vip.scd.yahoo.com (66.94.234.13): icmp_seq=1 ttl=50 time=23.5 ms
64 bytes from w2.rc.vip.scd.yahoo.com (66.94.234.13): icmp_seq=2 ttl=50 time=23.6 ms
64 bytes from w2.rc.vip.scd.yahoo.com (66.94.234.13): icmp_seq=3 ttl=50 time=24.8 ms

now from VE 101:
# vzctl enter 101
entered into VE 101

# cat /etc/resolv.conf
nameserver 216.194.124.21


# ping yahoo.com
ping: unknown host yahoo.com

but can ping the IP for yahoo.com from the VE
# ping 66.94.234.13
PING 66.94.234.13 (66.94.234.13) 56(84) bytes of data.
64 bytes from 66.94.234.13: icmp_seq=1 ttl=49 time=24.8 ms
64 bytes from 66.94.234.13: icmp_seq=2 ttl=49 time=24.0 ms
64 bytes from 66.94.234.13: icmp_seq=3 ttl=49 time=23.7 ms

[Updated on: Thu, 19 April 2007 03:54]

Report message to a moderator

Re: DNS lookup not working inside the VPS [message #12178 is a reply to message #12167] Thu, 19 April 2007 06:44 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

I know, you wrote, that firewall is off, but however, can you, please, post here the output of the following commands:

/sbin/iptables -L -nv
/sbin/iptabes -t nat -L -nv
/sbin/ip a l
/sbin/ip r l

Please, do this commands in VE and on HOST!

One more question, can you ping the IP of your DNS server from VE? I mean `/bin/ping 216.194.124.21`.

BTW, can you give an access to the node?

Thank you,
Vasily.
icon4.gif  Re: DNS lookup not working inside the VPS [message #12187 is a reply to message #12178] Thu, 19 April 2007 15:01 Go to previous messageGo to next message
bfullmer is currently offline  bfullmer
Messages: 7
Registered: April 2007
Junior Member
NODE:
[root@ut-ve0001 ~]# /sbin/iptables -L -nv
Chain INPUT (policy ACCEPT 79722 packets, 110M bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 3114 packets, 364K bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 44684 packets, 3034K bytes)
pkts bytes target prot opt in out source destination
[root@ut-ve0001 ~]# /sbin/iptabes -t nat -L -nv
-bash: /sbin/iptabes: No such file or directory
[root@ut-ve0001 ~]# /sbin/ip a l
2: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
4: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:20:ed:05:58:2a brd ff:ff:ff:ff:ff:ff
inet 192.168.15.201/24 brd 192.168.15.255 scope global eth0
6: eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:20:ed:05:58:2b brd ff:ff:ff:ff:ff:ff
inet 209.41.77.226/28 brd 209.41.77.239 scope global eth1
inet6 fe80::220:edff:fe05:582b/64 scope link
valid_lft forever preferred_lft forever
8: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
1: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc noqueue
link/void
[root@ut-ve0001 ~]# /sbin/ip r l
209.41.77.236 dev venet0 scope link src 209.41.77.226
209.41.77.224/28 dev eth1 proto kernel scope link src 209.41.77.226
192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.201
169.254.0.0/16 dev eth1 scope link
default via 209.41.77.225 dev eth1
[root@ut-ve0001 ~]#


inside VE 1010
[root@ut-ve0001 ~]# vzctl enter 1010
entered into VE 1010
[root@vps1010 /]# ping yahoo.com
ping: unknown host yahoo.com
[root@vps1010 /]# exit
logout
exited from VE 1010
[root@ut-ve0001 ~]# /sbin/iptables -L -nv
Chain INPUT (policy ACCEPT 79722 packets, 110M bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 3114 packets, 364K bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 44684 packets, 3034K bytes)
pkts bytes target prot opt in out source destination
[root@ut-ve0001 ~]# /sbin/iptabes -t nat -L -nv
-bash: /sbin/iptabes: No such file or directory
[root@ut-ve0001 ~]# /sbin/ip a l
2: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
4: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:20:ed:05:58:2a brd ff:ff:ff:ff:ff:ff
inet 192.168.15.201/24 brd 192.168.15.255 scope global eth0
6: eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:20:ed:05:58:2b brd ff:ff:ff:ff:ff:ff
inet 209.41.77.226/28 brd 209.41.77.239 scope global eth1
inet6 fe80::220:edff:fe05:582b/64 scope link
valid_lft forever preferred_lft forever
8: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
1: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc noqueue
link/void
[root@ut-ve0001 ~]# /sbin/ip r l
209.41.77.236 dev venet0 scope link src 209.41.77.226
209.41.77.224/28 dev eth1 proto kernel scope link src 209.41.77.226
192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.201
169.254.0.0/16 dev eth1 scope link
default via 209.41.77.225 dev eth1
[root@ut-ve0001 ~]#
[root@ut-ve0001 ~]# vzctl enter 1010
entered into VE 1010
[root@vps1010 /]# /sbin/iptables -L -nv
Chain INPUT (policy ACCEPT 1489 packets, 135K bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 1559 packets, 225K bytes)
pkts bytes target prot opt in out source destination
[root@vps1010 /]# /sbin/iptabes -t nat -L -nv
-bash: /sbin/iptabes: No such file or directory
[root@vps1010 /]# /sbin/ip a l
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc noqueue
link/void
inet 127.0.0.1/32 scope host venet0
inet 209.41.77.236/32 brd 209.41.77.236 scope global venet0:0
[root@vps1010 /]# /sbin/ip r l
192.0.2.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link
default via 192.0.2.1 dev venet0
[root@vps1010 /]#

/bin/ping 216.194.124.21
PING 216.194.124.21 (216.194.124.21) 56(84) bytes of data.
64 bytes from 216.194.124.21: icmp_seq=1 ttl=63 time=1.62 ms
64 bytes from 216.194.124.21: icmp_seq=2 ttl=63 time=0.428 ms

--- 216.194.124.21 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.428/1.028/1.628/0.600 ms
[root@ut-ve0001 ~]# vzlist
VEID NPROC STATUS IP_ADDR HOSTNAME
1010 17 running 209.41.77.236 vps1010.tele-bridge.net
[root@ut-ve0001 ~]# vzctl enter 1010
entered into VE 1010
[root@vps1010 /]# /bin/ping 216.194.124.21
PING 216.194.124.21 (216.194.124.21) 56(84) bytes of data.
64 bytes from 216.194.124.21: icmp_seq=1 ttl=62 time=1.61 ms
64 bytes from 216.194.124.21: icmp_seq=2 ttl=62 time=0.408 ms
64 bytes from 216.194.124.21: icmp_seq=3 ttl=62 time=0.499 ms

--- 216.194.124.21 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.408/0.841/1.616/0.549 ms
[root@vps1010 /]#

[root@vps1010 /]# cat /etc/resolv.conf
nameserver 216.194.124.21

[root@vps1010 /]# ping yahoo.com
ping: unknown host yahoo.com

It should work! I can't figure out what is going on.


[Updated on: Fri, 20 April 2007 03:32]

Report message to a moderator

*SLOVED* Re: DNS lookup not working inside the VPS [message #12213 is a reply to message #12187] Fri, 20 April 2007 15:20 Go to previous messageGo to next message
bfullmer is currently offline  bfullmer
Messages: 7
Registered: April 2007
Junior Member

I set up second DNS server for your VE and now it works well:

[root@ut-ve0001 ~]# cat /etc/resolv.conf
search tele-bridge.com
nameserver 216.194.124.21
nameserver 216.194.124.22
[root@ut-ve0001 ~]# vzctl set 1010 --nameserver 216.194.124.22 --save
File resolv.conf was modified
Saved parameters for VE 1010
[root@ut-ve0001 ~]# vzctl exec 1010 ping gmail.com
PING gmail.com (72.14.253.83) 56(84) bytes of data.
64 bytes from po-in-f83.google.com (72.14.253.83): icmp_seq=1 ttl=231 time=82.5 ms
64 bytes from po-in-f83.google.com (72.14.253.83): icmp_seq=2 ttl=231 time=83.5 ms

[root@ut-ve0001 ~]#



So the reason of the problem is that your first DNS server (216.194.124.21), but the second one (216.194.124.22) works.

Vasily
Re: *SLOVED* Re: DNS lookup not working inside the VPS [message #12428 is a reply to message #12213] Fri, 27 April 2007 21:42 Go to previous messageGo to next message
jpedroza2k is currently offline  jpedroza2k
Messages: 2
Registered: April 2007
Location: Eagle Mountain, Utah
Junior Member

Hello,
I am running into this same issue. Whenever I create a VE it can't do any kind of hostname lookups. I have disabled the iptables firewall, added 2 working name servers and still nothing. Any help would be appreciated.

Jared Pedroza
Re: *SLOVED* Re: DNS lookup not working inside the VPS [message #12434 is a reply to message #12428] Sat, 28 April 2007 06:25 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

goeldi reports that he found the following issue:
if you boot your node with iptables and then flush the rules - DNS doesn't work, but if you boot the node without iptables (disabled in initscripts) - everything works great.

Can you confirm it, please?

Thanks,
Vasily.
Re: *SLOVED* Re: DNS lookup not working inside the VPS [message #12475 is a reply to message #12434] Mon, 30 April 2007 18:16 Go to previous message
jpedroza2k is currently offline  jpedroza2k
Messages: 2
Registered: April 2007
Location: Eagle Mountain, Utah
Junior Member

Ok, I am an idiot. I updated the VPS not the node, after removing iptables from the node it works fine.

Thanks,

Jared Pedroza

[Updated on: Mon, 30 April 2007 18:32]

Report message to a moderator

Previous Topic: *SOLVED* Memory usage query
Next Topic: 4Servers crashes no video , no error , Please help!
Goto Forum:
  


Current Time: Mon Jul 15 15:29:53 GMT 2024

Total time taken to generate the page: 0.02457 seconds