Results 1 to 4 of 4
-
04-01-2012, 11:52 AM #1Junior Guru Wannabe
- Join Date
- Feb 2011
- Posts
- 36
Howto redirect port with iptables
Howto forward http port (80) to https port (443) with iptables. I wuant redirect all connect access to https.
Thank you
-
04-01-2012, 08:45 PM #2Temporarily Suspended
- Join Date
- Feb 2012
- Posts
- 25
Please use the following command for redirect port.
# iptables –t nat –A PREROUTING –i eth0 –p tcp –dport 80 –j REDIRECT –to-port 443
# /etc/init.d/iptables save
# chk con fig ipt a bles on
-
04-01-2012, 09:12 PM #3Junior Guru Wannabe
- Join Date
- Feb 2011
- Posts
- 36
-
06-07-2012, 09:25 AM #4Newbie
- Join Date
- Jun 2012
- Location
- Amsterdam
- Posts
- 13
Dear daicadung,
Using iptables for this purpose is not a good idea and will certainly not work with the command supplied by godzbless. Iptables is meant for TCP/IP level forwarding and you need a HTTP 301 redirect. This can be done using your webserver's configuration.
Since this is in the security forum, it is also worth noting that redirects to the secure website are not a secure thing to do, as proven by Moxie Marlinspike's sslstrip.
Similar Threads
-
Howto Using Iptables Block User-Agent ?
By daicadung in forum Hosting Security and TechnologyReplies: 15Last Post: 03-25-2012, 12:43 PM -
Redirect IP using iptables?
By PirateSolutions in forum Hosting Security and TechnologyReplies: 1Last Post: 05-02-2011, 03:58 AM -
iptables REDIRECT to RemoteIP
By Lander in forum Hosting Security and TechnologyReplies: 2Last Post: 03-08-2011, 03:40 AM -
Redirect traffic via iptables
By Markovic in forum Hosting Security and TechnologyReplies: 7Last Post: 01-10-2010, 03:47 AM -
iptables redirect rule - please help
By SysTeam in forum Hosting Security and TechnologyReplies: 3Last Post: 08-07-2009, 09:03 PM