LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-07-2001, 06:09 PM   #1
jrmann1999
Member
 
Registered: Feb 2001
Location: Texas
Distribution: Slackware, Mandrake, LFS
Posts: 306

Rep: Reputation: 30
DNAT Help(port forwarding)


Trying to use IPTABLES on my linux machine which acts both as my gateway/router and as my firewall. I have a win2k box behind this on a private IP(10.0.0.3 for this examples sake). My linux box would then be 10.0.0.1. I have tried this:

iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to 10.0.0.3:3000

My win2k box is running G6FTP on port 3000, hence the forward. However when I try to ftp into port 3000 on my linux machine I immediately get a connection denied. The packet did NOT traverse my other tables(because it was not logged which is the last step before being dropped) so I have NO clue how to debug this, any ideas?

J
 
Old 08-09-2001, 10:58 PM   #2
jrmann1999
Member
 
Registered: Feb 2001
Location: Texas
Distribution: Slackware, Mandrake, LFS
Posts: 306

Original Poster
Rep: Reputation: 30
for those that care, this fixed it:

iptables -t nat -A PREROUTING -s ! 10.10.0.3 -p tcp --dport 3000 -j DNAT --to 10.10.0.3:3000

I'm guessing that the packet replies from 10.10.0.3 were being redirected back to itself making a lovely indefinate loop.

J
 
  


Reply



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
Help with iptables/DNAT/forwarding lohb1ac Linux - Networking 2 12-05-2005 08:48 AM
Port Forwarding using iptables-DNAT radupastia Linux - Networking 2 07-18-2003 02:14 AM
IPTables - DNAT, SNAT, port forwarding FunkFlex Linux - Security 2 01-15-2002 07:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:53 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration