euglug.org

[Eug-lug] iptables

작성자

카테고리:



Jim BeardMon Oct 31 10:53:54 PST 2005

Howdy Folks,

	I have a question about port forwarding with iptables.

I want to forward port 80 to port 443 on the same machine.  I added the 
following entries to iptables:

iptables -t nat -A PREROUTING -p tcp [-i eth0] --dport 80 -j DNAT --to 
<external ip>:443

iptables -A FORWARD -p tcp [-i eth0] --dport 443 -j ACCEPT

The behavior I experience, is that when I try to reach port 80 on the 
external ip from an external network, instead of forwarding my 
connection, the web browser prompts me to download something.  
Sometimes it is the name of the first folder in the path, sometimes the 
name is a random string of characters, like "v8bdpmp2".  The files 
created if I save are listed as 1k in size.

Anyone have any advice?  It seems like it should work.  I don't have 
any other rules set up in my nat table or on the forward list...


Jim Beard
counterclaim, Inc
http://www.counterclaim.com
http://openefm.sourceforge.net
(800) 264-8145