OpenVZ Forum


Home » General » Support » DNS wont work and cant ping but it works...
DNS wont work and cant ping but it works... [message #27389] Sat, 16 February 2008 09:55 Go to next message
KyleC is currently offline  KyleC
Messages: 21
Registered: October 2007
Junior Member

Alright all my VEs have the same problem. Basically i can ping and trace from my HN:
[root@monster ~]# ping google.com
PING google.com (64.233.167.99) 56(84) bytes of data.
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=1 ttl=247 time=59.7 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 59.754/59.754/59.754/0.000 ms
[root@monster ~]#

now as soon as i go into any VE it wont find it at all. the VE itself is working on the web: boxstr.com but the dns isnt working and i cannot ping any site except the HN itself.

when i reset the network using service network restart:
[root@glimpse /]# service network restart
Shutting down interface venet0: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
error: unknown error 1 setting key 'kernel.sysrq'
error: unknown error 1 setting key 'kernel.core_uses_pid'
[FAILED]
Bringing up loopback interface: [ OK ]
Bringing up interface venet0: [ OK ]
[root@glimpse /]#


and the HN

[root@monster ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface venet0: Shutting down interface venet0:
[ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0
[ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface venet0: Bringing up interface venet0:
Configuring interface venet0:
net.ipv4.conf.venet0.send_redirects = 0
[ OK ]
[root@monster ~]#


any ideas? let me know if you need anything else im using centos 5 64 bit on the HN and centos4 64bit on VE and it does the same thing on 32bit VE as well.

Re: DNS wont work and cant ping but it works... [message #27395 is a reply to message #27389] Sat, 16 February 2008 19:56 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
According to the output of your network init script on HN, it disables IP forwarding:
[root@monster ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface venet0: Shutting down interface venet0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0
It explains why you can't ping external nodes.

You can turn IP forwarding on by (on HN)
 # sysctl net.ipv4.ip_forward=1
To make this change permanent use /etc/sysctl.conf file.

HTH,
Vasily
Re: DNS wont work and cant ping but it works... [message #27402 is a reply to message #27395] Sat, 16 February 2008 22:00 Go to previous messageGo to next message
KyleC is currently offline  KyleC
Messages: 21
Registered: October 2007
Junior Member

Vasily Tarasov wrote on Sat, 16 February 2008 14:56

According to the output of your network init script on HN, it disables IP forwarding:
[root@monster ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface venet0: Shutting down interface venet0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0
It explains why you can't ping external nodes.

You can turn IP forwarding on by (on HN)
 # sysctl net.ipv4.ip_forward=1
To make this change permanent use /etc/sysctl.conf file.

HTH,
Vasily



hi, that still didnt fix it. anything else? and the reason why it shut down ip_forwarding is because it was restarting the network. =1 is in my config file not =0

[Updated on: Sat, 16 February 2008 22:01]

Report message to a moderator

Re: DNS wont work and cant ping but it works... [message #27403 is a reply to message #27402] Sat, 16 February 2008 22:16 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Check that forwarding rules on HN are correct and iptables settings do not block packets.

Vasily.
Re: DNS wont work and cant ping but it works... [message #27404 is a reply to message #27403] Sat, 16 February 2008 22:26 Go to previous messageGo to next message
KyleC is currently offline  KyleC
Messages: 21
Registered: October 2007
Junior Member

Vasily Tarasov wrote on Sat, 16 February 2008 17:16

Check that forwarding rules on HN are correct and iptables settings do not block packets.

Vasily.



my site is on the VE: http://boxstr.com the only things that are not working are ping, traceroutes and dns so it is forwarding packets.. iptables has been flushed and everything..
Re: DNS wont work and cant ping but it works... [message #27443 is a reply to message #27404] Mon, 18 February 2008 07:29 Go to previous messageGo to next message
KyleC is currently offline  KyleC
Messages: 21
Registered: October 2007
Junior Member

Hey guys still isnt working for me and i need this fixed. any ideas?
Re: DNS wont work and cant ping but it works... [message #27464 is a reply to message #27443] Mon, 18 February 2008 09:57 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

just to clarify the situation:

1. You use public IPs on HN and inside VE?
2. net.ipv4.ip_forward = 1 on HN
3. You have flushed all iptables rules.
4. You have set appropriate nameserver inside VE.
5. IP address are used inside VE is workable.
6. You cannot ping any site by its name and you cannot ping any site by its IP address from inside VE.
7. And what does "tcpdump" output show from HN and from VE?

Thank You!
Re: DNS wont work and cant ping but it works... [message #27465 is a reply to message #27464] Mon, 18 February 2008 10:00 Go to previous messageGo to next message
KyleC is currently offline  KyleC
Messages: 21
Registered: October 2007
Junior Member

alright i can now ping it was a weird ip issue so thats resolved. now i am running lighttpd and i have fcgi proxy for php requests and now i cannot get a connection to 127.0.0.1:9000 at all. it says connection timed out so basically my site cannot serve any type of files at all. lighttpd works because it serves static content like images but it wont work at all... its weird.. any idea?
Re: DNS wont work and cant ping but it works... [message #27467 is a reply to message #27465] Mon, 18 February 2008 10:15 Go to previous messageGo to next message
den is currently offline  den
Messages: 494
Registered: December 2005
Senior Member
Try 'telnet 127.0.0.1 9000' to clarify what happens.

tcpdump the loopback and examine the network statistics inside
(netstat -s).

Regards,
Den

Re: DNS wont work and cant ping but it works... [message #27470 is a reply to message #27467] Mon, 18 February 2008 10:41 Go to previous messageGo to next message
KyleC is currently offline  KyleC
Messages: 21
Registered: October 2007
Junior Member

den wrote on Mon, 18 February 2008 05:15

Try 'telnet 127.0.0.1 9000' to clarify what happens.

tcpdump the loopback and examine the network statistics inside
(netstat -s).

Regards,
Den




[root@glimpse /]# telnet 127.0.0.1 9001
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Re: DNS wont work and cant ping but it works... [message #27491 is a reply to message #27470] Mon, 18 February 2008 15:00 Go to previous message
den is currently offline  den
Messages: 494
Registered: December 2005
Senior Member
this means that networking works correctly, you have a problem with the configuration of your daemons.

Regards,
Den
Previous Topic: Debian guest iptables config
Next Topic: High number of /proc/user_beancounters failcnt
Goto Forum:
  


Current Time: Sun Sep 15 12:25:49 GMT 2024

Total time taken to generate the page: 0.04980 seconds