Visit Jeremy's Blog.
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 10-06-2005, 03:52 PM   #1
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
How can I forward all traffic to to using IPtables?

How can I forward all traffic to to using IPtables?
Old 10-06-2005, 04:19 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The general rule for port forwarding with iptables is:

iptables -t nat -I PREROUTING -p <protocol> -d <destination IP> --dport <destination port> -j DNAT --to-destination <destination IP>:<destination port>

So, for example:

iptables -t nat -I PREROUTING -p tcp -d --dport 80 -j DNAT --to-destination

Last edited by macemoneta; 10-06-2005 at 04:33 PM.


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
iptables forward traffic alaios Linux - Networking 1 09-28-2005 05:43 AM
Allowing connections to port 8080 in iptables apache363 Linux - Software 1 10-12-2004 03:14 PM
Simple iptables forwarding 8080 -> 80 gstarrett Linux - Networking 3 03-17-2004 01:52 PM
Trying to forward web traffic through firewall w/ IPTABLES ShinySteelRobot Linux - Networking 6 08-17-2003 06:43 PM
Please help me finish setup IPTABLES,all I need is to forward port 8080 pembo13 Linux - Networking 4 07-18-2003 11:28 PM > Forums > Linux Forums > Linux - Networking

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