Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-11-2013, 04:13 PM   #1
LQ Newbie
Registered: Jan 2011
Location: Austin, TX
Posts: 29

Rep: Reputation: 2
Gateway computer configuration question

I have the following network configuration, with computer 1 connected to computer 2, which is connected to the Internet.

Computer 1
default gateway:

Computer 2
eth1: XXX.XXX.XXX.27
default gateway: XXX.XXX.XXX.254

Routing table on Computer 2:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 eth3
XXX.XXX.XXX.0 * U 0 0 0 eth1 * U 0 0 0 eth2 * U 0 0 0 eth0
default XXX.XXX.XXX.254 UG 0 0 0 eth1

I have a firewall on Computer 2 that basically looks like this:

I want Computer 1 to be able to connect to the Internet through Computer 2. As a first step, I just want to be able to get a ping response from eth1 on Computer 2 from Computer 1. I can get a ping response from eth2, but not eth1. When I run tcpdump on Computer 2 I can see an ICMP request come in on eth0 and an ICMP reply come in on eth1, but I never see an ICMP reply go out on eth0.

Can anyone see what I need to add in order to be able to get a ping response from eth1 on Computer 1?

Old 03-11-2013, 09:38 PM   #2
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
The firewall on that link has the rule
# Don't forward from the outside to the inside.
iptables -A FORWARD -i eth1 -o eth1 -j REJECT
It seems this rule is causing the problem. Outside interface is eth0 but in this rule it is eth1, that does not seem correct. Can you try after replacing -i eth1 to -i eth0 in this rule?
Old 03-12-2013, 11:49 AM   #3
LQ Newbie
Registered: Jan 2011
Location: Austin, TX
Posts: 29

Original Poster
Rep: Reputation: 2
Thanks for your reply.

I ended up just giving up on getting a ping response from eth1, and just continuing on with my ultimate goal of getting from Computer 1 out to the Internet. For that purpose, everything works, so I'm not going to worry about it.



debian, firewall, gateway, routing

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
use unrestricted computer as gateway hemanshurpatel Linux - Networking 1 03-26-2010 06:26 AM
How to make linux the gateway computer? redss Linux - Networking 1 09-20-2009 12:07 PM
Gateway Computer Problem peteryu Linux - Networking 3 06-20-2007 09:28 PM
Want to have a computer be gateway w\xp clients chingasman Linux - Networking 4 10-06-2003 02:28 AM
Network Configuration to allow internet connection through gateway computer Ultrakapy Linux - Networking 3 07-30-2003 04:06 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:45 PM.

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