LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 04-23-2010, 10:08 AM   #1
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
Cannot ping to my machine from another subnet


I installed apache2 on my Ubuntu machine and I am trying to access the server from another subnet. The server is connected using ethernet and has a static ip address. I can ping from the server to any machine in the other subnet but non of the machine on that subnet can ping the server.

iptables does not seem to be running
Code:
# service iptables status
iptables: unrecognized service
and its rules are
Code:
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
also ufw seems to be inactive

Code:
# ufw status verbose
Status: inactive
The output of netstat shows that apache is listening on port 80
Code:
# netstat -plantu | grep apache
tcp6       0      0 :::80                   :::*                    LISTEN      1113/apache2
What is preventing my machine from being accessed from the other subnet?
 
Old 04-23-2010, 10:14 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 13,766

Rep: Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346
You don't have the right network information set up. Either your default gateway is wrong/missing, or some other piece (subnet mask, etc.).

If you can't get off your one subnet, chances are it's the default gateway.
 
Old 04-23-2010, 02:14 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, FreeBSD
Posts: 3,925
Blog Entries: 5

Rep: Reputation: Disabled
Right, if you still can't figure it out we'd need to see some IP info:

Code:
# ifconfig
Code:
# netstat -rn
Given that you can actually ping from the borked host to external hosts means it would also be worthwhile to check:

Code:
# sysctl net.ipv4.icmp_echo_ignore_all
 
Old 04-24-2010, 01:46 PM   #4
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Original Poster
Rep: Reputation: 30
I am sorry guys for taking this long to get back to you, I got busy yesterday.

Here is the output:
Code:
~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:128.10.160.xxx  Bcast:128.10.160.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:31 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3732 (3.7 KB)  TX bytes:6846 (6.8 KB)
          Interrupt:29 Base address:0xc000
Code:
~$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
128.10.160.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         128.10.160.251  0.0.0.0         UG        0 0          0 eth0
Code:
~$ sysctl net.ipv4.icmp_echo_ignore_all
net.ipv4.icmp_echo_ignore_all = 0
 
Old 04-24-2010, 04:01 PM   #5
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 13,766

Rep: Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346Reputation: 2346
Quote:
Originally Posted by Basel View Post
I am sorry guys for taking this long to get back to you, I got busy yesterday.

Here is the output:
Code:
~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:128.10.160.xxx  Bcast:128.10.160.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:31 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3732 (3.7 KB)  TX bytes:6846 (6.8 KB)
          Interrupt:29 Base address:0xc000
Code:
~$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
128.10.160.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         128.10.160.251  0.0.0.0         UG        0 0          0 eth0
Code:
~$ sysctl net.ipv4.icmp_echo_ignore_all
net.ipv4.icmp_echo_ignore_all = 0
Ok. Is all that right?? We don't know the particulars of your network, or the information you got from your network guys. The .251 for the default gateway looks suspicious to me, but I (as a rule), always set default gateways to .1, but again, that's all up to your network guys.

Best thing to do would be to confirm with them the default gateway, and subnet mask.
 
Old 04-26-2010, 02:26 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, FreeBSD
Posts: 3,925
Blog Entries: 5

Rep: Reputation: Disabled
128.10.160.251 is definitely an unusual default router address. (i.e. Better double check, as mentioned.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ping subnet from outside of LAN? seattleweb Linux - Networking 4 09-22-2007 02:05 PM
subnet ping script neocontrol Programming 2 02-07-2007 02:43 PM
ping an ip from an interface with an ip of another subnet kpachopoulos Linux - Networking 1 09-01-2006 04:05 AM
Can ping subnet one way, but not the other ghight Linux - Networking 4 10-14-2005 09:00 AM
Can't ping any PC outside subnet mrpc_cambodia Red Hat 2 10-07-2004 08:48 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration