Share your knowledge at the LQ Wiki.
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 02-12-2005, 02:15 PM   #1
LQ Newbie
Registered: Aug 2004
Posts: 15

Rep: Reputation: 0
natting traffic between 2 interfaces

I have found out that it is my firewall that is blocking icmp traffic from returning trough the firewall.
The traffic is going out through the firewall because of tcpdump but the traffic is blocking comming back in.

How do I accept and forward icmp traffic from eth 1 to eth2.
And how do I accept and forward the icmp reply back from eth2 to the eth1 network.

Old 02-12-2005, 04:27 PM   #2
Registered: Sep 2004
Distribution: Fedora Core 3
Posts: 47

Rep: Reputation: 15
I'm by no means an expert, but I'll try and help. I suppose we're talking the IPTABLES firewall here. In a console with root rights try:
"iptables -A FORWARD -p ICMP -i ETH1 -o ETH2 -j ACCEPT" for enabling ETH1->ETH2 and
"iptables -A FORWARD -p ICMP -i ETH2 -o ETH1 -j ACCEPT" for ETH2->ETH1
If the packets are also meant for the linux machine itself, do the same commands, only with INPUT instead of FORWARD. You should also turn port forwarding on in oreder for the pacets to be traversed trough.
I also suggest that you study the man pages for iptables, so you know what you are doing.
Try typing "man iptables" into a console, it's written pretty nice.
Hope I helped, since IPTABLES is among the very few thing I've been able to undrestand so-far.
Old 02-14-2005, 12:12 AM   #3
LQ Newbie
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
It is still not working this my tcpdump when I try to ping from windows, the windows box must go through the linux box, to and the reply must come back through the linux box to the windows box.

23:14:36.573200 > icmp: echo request
23:14:37.062479 > udp 252
23:14:37.063416 > udp 270
23:14:37.064460 > 26878+ PTR? (46) (DF)
23:14:37.064437 > udp 324
23:14:37.069575 > udp 316
23:14:37.077237 > udp 246
23:14:37.078211 > udp 288
23:14:37.083455 > udp 320
23:14:37.091742 > udp 266
23:14:37.092753 > udp 318
23:14:37.097837 > udp 312
23:14:37.113012 > 26878 NXDomain 0/1/0 (103) (DF)
23:14:41.579886 > icmp: echo request
23:14:46.586581 > icmp: echo request

when I try it from the linux box i get

23:16:45.362306 > icmp: echo request (DF)
23:16:45.363041 > icmp: echo reply
23:16:46.372161 > icmp: echo request (DF)
23:16:46.372948 > icmp: echo reply
23:16:47.382156 > icmp: echo request (DF)
23:16:47.382885 > icmp: echo reply
23:16:48.392160 > icmp: echo request (DF)
23:16:48.392895 > icmp: echo reply

it seems to be working fine from the linux box.


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
Natting a FTP Traffic - urgent please!!!!! raja_lucky22 Linux - Security 1 07-04-2005 07:56 AM
natting twice zsoltrenyi Linux - Networking 9 01-26-2005 05:39 AM
Traffic on both interfaces geomonap Linux - Networking 1 01-13-2005 03:56 PM
Natting suvajit Linux - Software 1 05-15-2003 06:50 AM
Natting suraj Linux - Networking 1 01-23-2003 11:25 AM

All times are GMT -5. The time now is 08:36 AM.

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