Register a domain and help support LQ
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 07-04-2003, 08:16 PM   #1
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403

Rep: Reputation: 30
Simple enough...iptables..port forwarding

Hi guys,

I just wanted a little help.

Could someone give me some sample IPTABLES lines to do port forwading of ports 7750:7751 for both UDP and TCP, to a machine (

The router/firewall has:
-eth0 as the internal NIC on IP
-eth1 as the external NIC on a dynamic IP

And also, isn't #IPTABLE --check suppose to be the command to do rule checking with ITPABLES? If not, what is it to do rule checking please?

Thanks Alot
Old 07-05-2003, 11:10 AM   #2
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
iptables --check [chain]
to test this packet on chain

Try man iptables to see all commands
Old 07-18-2003, 10:05 PM   #3
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403

Original Poster
Rep: Reputation: 30
Old 07-19-2003, 01:22 AM   #4
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 49

iptables -t NAT
Old 07-19-2003, 02:08 AM   #5
Registered: Apr 2002
Location: Melbourne, Australia
Distribution: Gentoo
Posts: 273

Rep: Reputation: 30
Yopu may have already sorted this but a rule like the following should work

iptables -t nat -A PREROUTING -p tcp --dport 7750:7751 -i eth1 -j DNAT --to

any connection to eth1 on ports 7750 or 7751 will be passed through to (just change tcp fpr udp for the udp part).



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
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
iptables on router: simple port forwarding not working hamish Linux - Networking 1 10-27-2005 06:06 AM
Simple iptables forwarding 8080 -> 80 gstarrett Linux - Networking 3 03-17-2004 12:52 PM
How can I do simple port forwarding on RH9? yetalu Linux - Networking 4 07-14-2003 07:44 PM

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