LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-11-2009, 08:39 PM   #1
ratcateme
Member
 
Registered: Feb 2008
Distribution: CentOS 5.4
Posts: 59

Rep: Reputation: 15
simple port forwarding with iptables


i am using centos and trying to setup port forwarding my iptabes save looks like this
Code:
# Generated by iptables-save v1.3.5 on Mon Jan 12 15:17:09 2009
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [1:92]
-A PREROUTING -d 10.1.1.2 -p tcp -m tcp --dport 81 -m state --state NEW,RELATED,ESTABLISHED -j DNAT --to-destination 10.1.2.3:80
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Mon Jan 12 15:17:09 2009
i am trying to forward all traffic on eth0(10.1.1.2) port 81 to 10.1.2.3:80 (can be reached out eth1)
i have ip Masquerading setup so 10.1.2.3 access the internet through the linux box out eth0
the IP Masquerading is working fine it is just i am trying to workout port forwarding
thanks

Scott.
 
Old 01-12-2009, 04:05 PM   #2
ratcateme
Member
 
Registered: Feb 2008
Distribution: CentOS 5.4
Posts: 59

Original Poster
Rep: Reputation: 15
change to shorewall and got it working

Scott.
 
  


Reply


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
simple port forwarding SPEEDEX Linux - Networking 1 09-28-2007 11:20 AM
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 enough...iptables..port forwarding pembo13 Linux - Networking 4 07-19-2003 02:08 AM


All times are GMT -5. The time now is 05:23 AM.

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