Download your favorite Linux distribution at LQ ISO.
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 09-27-2005, 12:14 PM   #1
Senior Member
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
iptables forward traffic

Let me reexplain the problem plz
From src starts some traffic that goes to the this is the eth1 of the laptop
The laptop has also one more interface the that is connected back to back (cross cable) with the interface of an other pc with ip address
IO want the traffic that reaches reach the
This is the first step.. when i succesfully implement this then the next step is to forward this traffic from the pc to a second pc... ( i ll use the same methodology if step one works)
So now we can only focus to the first step
Plz take in mind that i dont have any firewall enables
/proc/sys/net/ipv4/ip_forward is set to 1. I have no other iptables rules applied... I will only apply what u ll write to do..
Before applying any iptables rules firstly i do
iptables -F
iptables -F -t nat
(if more flush commands are necessary plz say it so)
So i need your help to implement this simple task
Old 09-28-2005, 05:43 AM   #2
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
Let's try to sort this. I assume your default policies are all set to ACCEPT. Use "iptables -L" to check this. Your flushing shoul be OK. If not you will see rules in the output of "iptables -L"

Then try this
iptables -t nat -A PREROUTING -i eth1 -j DNAT --to-destination
This shoul have immediate effect. No service to restart.

What this does is just change the destination (to of the packets which reach the interface eth1 (


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
How can I forward all traffic to to using IPtables? abefroman Linux - Networking 1 10-06-2005 04:19 PM
iptables FORWARD Ipolit Slackware 16 06-09-2005 05:35 PM
iptables forward? Bambi Linux - Security 2 10-02-2003 11:15 AM
Trying to forward web traffic through firewall w/ IPTABLES ShinySteelRobot Linux - Networking 6 08-17-2003 06:43 PM
iptables FORWARD ArnaudVR Linux - Security 6 07-07-2003 06:05 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:18 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