Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Linux routing question

Posted on 2011-05-01
13
Medium Priority
?
528 Views
Last Modified: 2012-05-11
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
Comment
Question by:zazagor
  • 7
  • 3
  • 2
  • +1
13 Comments
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 668 total points
ID: 35501407
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
 
LVL 5

Author Comment

by:zazagor
ID: 35501460
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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 35501512
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 35501517
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
 
LVL 5

Assisted Solution

by:ts4673
ts4673 earned 668 total points
ID: 35502151
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
 
LVL 9

Assisted Solution

by:expert_tanmay
expert_tanmay earned 664 total points
ID: 35704829
Looks like your LINUX machine has iptables input policy set to deny. Can you check the output of iptables -L

Cheers..
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 35704873
Will you post your outoput

from host 1:

traceroute -d host2

From host 2:

traceroute -d host1
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 35716920
Oops sorry please use :

traceroute -dn hostx

x is 1 or 2 depending on what system you execute the command.  
0
 
LVL 9

Expert Comment

by:expert_tanmay
ID: 35717332
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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 35718820
@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
 
LVL 9

Expert Comment

by:expert_tanmay
ID: 35725647

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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 35727291
No problem :) Lets see but it seems that the Q is already abandoned : (
0
 
LVL 5

Author Closing Comment

by:zazagor
ID: 36117288
Sorry guys...I'm totally drunk
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question