John SechrestMon Oct 31 11:52:52 PST 2005
I think you should not be doing this with IP tables, but doing this with an apache redirect statement. It will behave much better in generall. Jim Beard <beard at counterclaim.com> writes: % I do want to go from an http request to an https. Sending an http % redirect is the only way to accomplish this? % % On Oct 31, 2005, at 11:36 AM, larry price wrote: % % > what's listening on port 443? % > % > if you are trying to forward an https response to an http browser % > request you will confuse the browser since it's not expecting to % > negotiate an encrypted session. You need to either use a proxy that % > can handle the https connection or use an http redirect to send the % > browser request to the https port. % > % > If you specifically need to forward https over port 80 (to deal with % > someone's (idiotic) firewall setup) you could try doing % > https://example.com:80/some/path/ % > % > you would have to do some configuration on the server end. % > % > On 10/31/05, Jim Beard <beard at counterclaim.com> wrote: % >> 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 % >> % >> _______________________________________________ % >> EUGLUG mailing list % >> euglug at euglug.org % >> http://www.euglug.org/mailman/listinfo/euglug % >> % > % > % > -- % > http://Zoneverte.org -- information explained % > Do you know what your IT infrastructure does? % > _______________________________________________ % > EUGLUG mailing list % > euglug at euglug.org % > http://www.euglug.org/mailman/listinfo/euglug % > % > % Jim Beard % counterclaim, Inc % http://www.counterclaim.com % http://openefm.sourceforge.net % (800) 264-8145 % % _______________________________________________ % EUGLUG mailing list % euglug at euglug.org % http://www.euglug.org/mailman/listinfo/euglug ----- John Sechrest . Helping people use . computers and the Internet . more effectively . . Internet: sechrest at peak.org . . http://www.peak.org/~sechrest