• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 531
  • Last Modified:

Linux routing question

Hi,

I have a linux alpine 2.6.1 with 2 network adapters and two windows hosts, one on each network. I cannot get host1 and host2 to communicate in both directions.

host1 <--> eth1 <--LINUX--> eth2 <-host2>

I can ping from : host2 to host1
                           host2 to eth1
                            eth2 to eth1
                            eth1 to eth2
                            eth1 to host1  
But I cannot ping from  eth1 to host2 or host1 to host2. Why??
All firewalls are disabled. Iptables on the linux shows ACCEPT ALL on input,output and forward.
Primaraly I should be able to ping host1 from eth2 because I can ping it from eth1.
I have of course enabled ip-forwarding.

Any ideas?
Am I missing a static route?
//zazagor
0
zazagor
Asked:
zazagor
  • 7
  • 3
  • 2
  • +1
3 Solutions
 
Kerem ERSOYPresidentCommented:
Hi,

Routing is by default disabled in linux systems you should enable it first. Use this command:

echo 1 > /proc/sys/net/ipv4/ip_forward

To make it permanenet please use this :

/etc/sysctl.conf:
net.ipv4.ip_forward = 1
0
 
zazagorAuthor Commented:
Like I said:
-I have of course enabled ip-forwarding
I have bouble checked that the file /proc/sys/net/ipv4/ip_forward  contains: 1
and  that
/etc/sysctl.conf:
net.ipv4.ip_forward = 1

Other ideas?

//zazagor
0
 
Kerem ERSOYPresidentCommented:
In fact I don't think alpine linux does have a sysctl.conf file. Please add it inside your /etc/rc.local or similar file which will run during the startup. Unfortunately alpine linux documents do not  metion a reference where to put the command.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Kerem ERSOYPresidentCommented:
will you provide the ouput of:

cat /proc/sys/net/ipv4/ip_forward

if it is 0 then routing is not enabled. If it is please check host1 and host2 and just make sure that their Default Gateway is the router system Ethernet at their side.

Cheers,
K.
0
 
ts4673Commented:
check your routing table on both hosts, also check your  TCPIP settings IP addresses, masks, default routes, etc. on both hosts and make sure you have the correct info. This error is usually caused by firewalls (IPFW) or routing
0
 
expert_tanmayCommented:
Looks like your LINUX machine has iptables input policy set to deny. Can you check the output of iptables -L

Cheers..
0
 
Kerem ERSOYPresidentCommented:
Will you post your outoput

from host 1:

traceroute -d host2

From host 2:

traceroute -d host1
0
 
Kerem ERSOYPresidentCommented:
Oops sorry please use :

traceroute -dn hostx

x is 1 or 2 depending on what system you execute the command.  
0
 
expert_tanmayCommented:
Hi KeremE, traceroute works on the ICMP protocol, zazagor is not able to ping how do you think traceroute is going to work. Moreover traceroute is to detect routing faults not connectivity..

Cheers..
0
 
Kerem ERSOYPresidentCommented:
@expert_tanmay:

> Hi KeremE, traceroute works on the ICMP protocol, zazagor is not able to ping how do you think

How about a  "careful" reading through the original question?:

> But I cannot ping from  eth1 to host2 or host1 to host2. Why??

Cheers,
K
0
 
expert_tanmayCommented:

Sorry KeremE you are right looks like some routing problem. zazagor please can you let us know the routing table of host1, Linux and host2.

Cheers..
0
 
Kerem ERSOYPresidentCommented:
No problem :) Lets see but it seems that the Q is already abandoned : (
0
 
zazagorAuthor Commented:
Sorry guys...I'm totally drunk
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 7
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now