LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 10-02-2001, 06:22 PM   #1
taylor
LQ Newbie
 
Registered: Oct 2001
Posts: 2

Rep: Reputation: 0
Simple iptables DNAT question


I am new to this so this is probly something really simple. I just want to forward a port coming in to an external address to an internal address on a certain port. The external address is an unused public address. Right now the firewall is configured with a default FORWARD policy of accept. I am using this syntax

iptables -t nat -A PREROUTING -p tcp -i eth0 -d $EXT_IP --dport 80 -j DNAT --to-destination $INT_IP:80

Everything shows up correct when looking at the nat table, but if I ping the external address I get destination host unreachable. However if I assign the external address I am using to the firewall as ex. eth0:1 then it port forwards to the internal address. How do I make this work without assigning the public ip to the firewall? I hope this makes sense.

Any help is appreciated
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with iptables/DNAT/forwarding lohb1ac Linux - Networking 2 12-05-2005 08:48 AM
iptables DNAT pshepperd Linux - Security 1 05-22-2004 03:56 PM
DNAT question (Iptables) wilsonmau Linux - Networking 1 06-06-2003 06:50 AM
iptables DNAT bentz Linux - Networking 15 05-19-2003 01:17 PM
Iptables newbie / simple question wr3ck3d Linux - Networking 2 03-06-2003 08:08 AM


All times are GMT -5. The time now is 08:51 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
Open Source Consulting | Domain Registration