LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Cannot ping router or outside network (https://www.linuxquestions.org/questions/linux-networking-3/cannot-ping-router-or-outside-network-4175481429/)

Gmoney99 10-19-2013 02:54 PM

Cannot ping router or outside network
 
Hey all,
I recently had to replace my router. I have 2 Centos servers and a windows machine on my network. My mailserver and windows machines work fine. My DNS server will not ping the router and anything outside the network. I can ping all machines and DNS is working fine inside the network. The router also shows all computers connected and with the right IP addresses. Does not work with firewall down either.

I have looked through all configuration files and cannot find anything wrong. I am not exactly a linux expert but everything was working perfectly on the old router.

I would appreciate any help or ideas.

Thanks

cospengle 10-19-2013 03:52 PM

Is the default gateway of the DNS machine set to the IP of the router?

Gmoney99 10-19-2013 04:25 PM

Yep, gateway is set to router IP.

lleb 10-19-2013 06:41 PM

post your ifcfg-eth0, resolv.conf as well as the internal IP scheme for your new LAN.

Gmoney99 10-19-2013 09:18 PM

Here are my ifcfg-eth0, resolv.conf, and route -n results. I added the Google DNS server in
there just trying stuff. It usually is not in there.

Code:

route -n

Destination    Gateway        Genmask        Flags Metric Ref    Use    Iface
192.168.2.0    0.0.0.0        255.255.255.0  U    1      0        0    eth0
0.0.0.0        192.168.2.1    0.0.0.0        UG    0      0        0    eth0




Code:

ifcfg-eth0

DEVICE="eth0"
BOOTPROTO=none
DNS1="192.168.2.7"
DNS2="8.8.8.8"
IPADDR="192.168.2.7"
NETMASK="255.255.255.0"
GATEWAY="192.168.2.1"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
DOMAIN="xxxxxxxx.com"
NAME="System eth0"




Code:

resolv.conf

search xxxxxxxx.com
nameserver 192.168.2.7
nameserver 8.8.8.8


lleb 10-20-2013 08:58 AM

even though this is specific to CentOS 5.x its the same for 6.x

https://www.centos.org/docs/5/html/D...ng-client.html

clean out your ifcfg-eth0 and restart your network and try again. everything should be provided by your DHCP server, be that your ISP, or your internal device.

Gmoney99 10-20-2013 11:19 AM

Thanks lleb, that worked. It seems what broke it was setting my router DNS ip setting to my network DNS server. On my old router I think I had it set up that way. Now, the only problem is I cannot get outside email. Internal email works fine. I had this problem when I initially set the mailserver up which is why I set up the DNS server but cannot recall how I got that to work.

psycroptic 10-20-2013 12:37 PM

have you forwarded proper ports on the new router to the mailservers internal IP?

Gmoney99 10-20-2013 12:55 PM

I have all mail ports forwarded to the mailserver and port 53 forwarded to the dns server

psycroptic 10-20-2013 01:01 PM

can you telnet port 25 from the internet to the router IP at all & get a helo? like manually?
your new router potentially could have pulled a new external IP from your isp, perhaps you need to update the A record of your domain name provider to reflect it, if you haven't already.
run a tcpdump on both interfaces of the router and the mail server to find out where traffic is getting stopped

lleb 10-20-2013 01:42 PM

Quote:

Originally Posted by Gmoney99 (Post 5049125)
Thanks lleb, that worked. It seems what broke it was setting my router DNS ip setting to my network DNS server. On my old router I think I had it set up that way. Now, the only problem is I cannot get outside email. Internal email works fine. I had this problem when I initially set the mailserver up which is why I set up the DNS server but cannot recall how I got that to work.

yeah that happens. its no big deal. keep in mind that when you are using DHCP all of your information should be provided by the DHCP server. the IP, gateway, subnet, and DNS information.

the only time you need to manually provide gateway and subnet is when you are on static IP scheme like on a server.

the DNS in linux is semi hit or miss if the DHCP server will provide or not the proper working DNS information. that is more on how the DHCP server is configured. a lot of SoHo routers and ISP devices are NOT properly configured for DHCP and thus fail to fully provide DNS for linux systems.

in cases like that you just need to edit the resolv.conf and you are golden.

Gmoney99 10-21-2013 06:58 AM

Doh!!! In the port forwarding screen on the router, there is a little check box beside each entry that turns it on. I was thinking just adding the entry would turn it on. Once I checked all the boxes and hit save, everything starting working.

I really appreciate all the help.

Thanks.

psycroptic 10-23-2013 03:57 PM

lol that'll get ya


All times are GMT -5. The time now is 02:40 AM.