Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


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

Rep: Reputation: 0
Unhappy DNAT won't work

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


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
Dnat+fqdn roopunix Linux - Networking 5 07-28-2005 08:13 AM
dnat kapcreations Linux - Networking 1 12-28-2004 04:12 PM
iptables DNAT of pop3 won't work danGynn Linux - Networking 0 02-26-2004 11:49 AM
IP Tables DNAT hakcenter Linux - Networking 5 11-02-2003 10:35 PM
iptables DNAT bentz Linux - Networking 15 05-19-2003 01:17 PM > Forums > Linux Forums > Linux - Security

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