LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-19-2013, 02:54 PM   #1
Gmoney99
LQ Newbie
 
Registered: Jul 2013
Posts: 9

Rep: Reputation: Disabled
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
 
Old 10-19-2013, 03:52 PM   #2
cospengle
Member
 
Registered: Feb 2008
Location: Armidale, NSW, Australia
Distribution: Fedora 8
Posts: 32

Rep: Reputation: 6
Is the default gateway of the DNS machine set to the IP of the router?
 
Old 10-19-2013, 04:25 PM   #3
Gmoney99
LQ Newbie
 
Registered: Jul 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
Yep, gateway is set to router IP.
 
Old 10-19-2013, 06:41 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
post your ifcfg-eth0, resolv.conf as well as the internal IP scheme for your new LAN.
 
Old 10-19-2013, 09:18 PM   #5
Gmoney99
LQ Newbie
 
Registered: Jul 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-20-2013, 08:58 AM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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.
 
Old 10-20-2013, 11:19 AM   #7
Gmoney99
LQ Newbie
 
Registered: Jul 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-20-2013, 12:37 PM   #8
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
have you forwarded proper ports on the new router to the mailservers internal IP?
 
Old 10-20-2013, 12:55 PM   #9
Gmoney99
LQ Newbie
 
Registered: Jul 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
I have all mail ports forwarded to the mailserver and port 53 forwarded to the dns server
 
Old 10-20-2013, 01:01 PM   #10
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
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
 
Old 10-20-2013, 01:42 PM   #11
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by Gmoney99 View Post
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.
 
Old 10-21-2013, 06:58 AM   #12
Gmoney99
LQ Newbie
 
Registered: Jul 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-23-2013, 03:57 PM   #13
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
lol that'll get ya
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect to Network (can ping router) but can't access the Internet DGrieve Linux - Networking 9 04-02-2014 07:47 AM
[SOLVED] ping to a local network router answer from other server igadoter Linux - Networking 2 10-19-2010 04:29 AM
Strange: Can ping network computers but NOT router! BaltikaTroika Linux - Networking 2 05-11-2007 05:17 AM
No network connection, unable to ping netgear router from RH Linux alak123 Linux - Hardware 9 05-06-2006 12:11 PM
No network connection, unable to ping netgear router from RH Linux alak123 Linux - Hardware 4 05-03-2006 10:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration