LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-09-2008, 02:14 PM   #1
illscience
LQ Newbie
 
Registered: May 2007
Posts: 25

Rep: Reputation: 15
pinging linksys router from Linux box to internal network not working


Hi my Linux box has two ethernet cards installed. eth0 goes to the Net and eth1 to the linksys wireless router. eth1 has an ip of 192.168.1.1 and the router is 192.168.1.2. I can ping 192.168.1.1 but cannot ping the router at 192.168.1.2. I can also ping the Linux box from a laptop inside the internal network connect via wireless to the router, and can SSH into the box. Does anyone have any idea why I cannot ping the router?
 
Old 07-09-2008, 02:26 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Is the router configured to respond to ping? I'm guessing it is not.

HTH

Forrest
 
Old 07-09-2008, 03:08 PM   #3
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31
You should check into your router firewalling settings if there's not any INPUT filter rule blocking ICMP packets.
 
Old 07-09-2008, 03:17 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
What interface on the Linksys router is connected to eth1 ? the WAN interface ?

Is your setup like this ?
Code:
Internet 
  |
  |
  |
eth0
Linux Box
eth1
  |
  | 
  |
WAN
Linksys Router
Internal
  |
  |
  |
Internal network

Last edited by farslayer; 07-09-2008 at 03:19 PM.
 
Old 07-09-2008, 04:18 PM   #5
illscience
LQ Newbie
 
Registered: May 2007
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by farslayer View Post
What interface on the Linksys router is connected to eth1 ? the WAN interface ?

Is your setup like this ?
Code:
Internet 
  |
  |
  |
eth0
Linux Box
eth1
  |
  | 
  |
WAN
Linksys Router
Internal
  |
  |
  |
Internal network

Yes it's set up just like that. The router does respond to ICMP because I can ping it with a laptop connected to it.
 
Old 07-09-2008, 05:42 PM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK, then is your Linux firewall blocking icmp traffic?

Forrest

Edit: Never mind, I see you already answered that.
 
Old 07-10-2008, 12:13 AM   #7
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31


From which box are you trying to ping the router? Perhaps this box from where you're trying pinging the router has output ICMP filter rules blocking it.

Is it a Linux box? You can check the iptables rules from the same box using the following command:

Quote:
iptables -L

Last edited by sparc86; 07-10-2008 at 12:15 AM.
 
Old 07-10-2008, 07:38 AM   #8
illscience
LQ Newbie
 
Registered: May 2007
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by sparc86 View Post


From which box are you trying to ping the router? Perhaps this box from where you're trying pinging the router has output ICMP filter rules blocking it.

Is it a Linux box? You can check the iptables rules from the same box using the following command:

From the Linux box. OUTPUT defaults to ACCEPT. INPUT accepts icmp-request and icmp-reply.
 
Old 07-10-2008, 07:40 AM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
So is the 'Block WAN Requests' box checked in the router config ?


From the Linksys Router User Guide

Quote:
• By enabling the Block WAN Request feature, you can prevent your network
from being pinged, or detected, by other Internet users. The Block WAN
Request feature also adds another measure of security to your network by
hiding your network ports. Both functions of the Block WAN Request feature
make it more difficult for outside users to work their way into your network.
 
Old 07-10-2008, 07:44 AM   #10
illscience
LQ Newbie
 
Registered: May 2007
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by farslayer View Post
So is the 'Block WAN Requests' box checked in the router config ?


From the Linksys Router User Guide

Hmmmm I'm not sure. That may be the problem. I'll give it a look when I get home.

Ok I just read that Block WAN Requests is enabled by default, and I didn't change it so that is likely the problem. Even with that being enabled I still was unable to get Internet access from inside the private network. I think it may have something to do with the iptables_nat module not being loaded. I'll have to check that when I get home as well.

Last edited by illscience; 07-10-2008 at 08:04 AM.
 
Old 07-10-2008, 08:18 AM   #11
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Your other issue is probably related to routing.. Each router needs to know what networks are located where. and you would need to add a static routing table on the Linux box in order for information from the internet to make it back to PC's on the inside of the Linksys Router.

Lets go back to our diagram for a minute, and add some addressing...

Code:
Internet - 64.210.41.1
  |
  |
eth0 - Public IP Address - 64.210.41.17
Linux Box
eth1 - 192.168.1.1
  |
  | 
  |
WAN - 192.168.1.2
Linksys Router
Internal - 192.168.0.1
  |
  |
  |
Internal network
Basically you need to add a route in the Linux box that say 'to get to 192.168.0.0 go through the next hop at address 192.168.1.2'

route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.1.2


You should then have a new line in your routing table so it would look something like this...
Code:
it-etch:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     192.168.1.2     255.255.255.0   UG    0      0        0 eth1
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
64.210.41.0     *               255.255.255.0   U     0      0        0 eth0
default         64.210.41.1     0.0.0.0         UG    0      0        0 eth0
Let us know how you make out..

Last edited by farslayer; 07-10-2008 at 08:22 AM.
 
  


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
Apache is not working on my Linux box that is acting as a router notapplicable Linux - Networking 8 06-27-2007 02:49 AM
wireless card pinging external to Linksys router? JonesUMD Linux - Wireless Networking 0 12-27-2004 02:12 AM
Linksys cable router setup Linux box no net access Phebes Linux - Networking 19 09-17-2004 11:53 PM
linux network with linksys router iaredam Linux - Networking 3 08-22-2003 07:58 PM
Linux box can't see linksys router mjohns63 Linux - Networking 0 07-23-2003 11:51 PM

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

All times are GMT -5. The time now is 06:47 PM.

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