I run debian sarge 3.1 2.6,apache-ssl and apache 1.3,my lan has a front modem-router,and a linuxbox gateway firewall attached to it,a switch,and 3 more servers,mail,www,icecast2.
I don't know what is wrong with my configuration both iptables and apache but i don't manage to redirect those people still connecting to 80 when i moved the server to 443 but worst ... tcpdumping tcp port 443 and ,from the laptop on the fron-router,ponting the browser to
https://www.hardcode.ath.cx
Quote:
root@argo:~# tcpdump tcp port 80 -n -vv
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
0 packets captured
0 packets received by filter
0 packets dropped by kernel
|
I have these iptables on the gateway machine:
Quote:
$IPT -t nat -A PREROUTING -p tcp -i eth0 -d 192.168.0.2 --dport 80 -j DNAT --to 192.168.1.3:443
$IPT -A FORWARD -i eth0 -o eth1 -p tcp -m state --state NEW -s $ARG0 --dport 443 -d 192.168.1.3 -j ACCEPT
|
On the www machine iptables :
Quote:
|
$ipt -t nat -A PREROUTING -i eth0 -p tcp -d 192.168.1.3 --dport 80 -j REDIRECT --to-port 443
|
Apache has mod_rewrite to handle the rewriting of the url but ...
Quote:
RewriteEngine On
RewriteCond %{SERVER_PORT} !=80
RewriteRule ^.* - [F]
RewriteRule ^(.*)$ https://www.hardcode.ath.cx/$1 [L,R]
|
Well!I know it's not enough to understand the origin of the problem but at the list how do these directives look ???
Recent comments
9 hours 6 min ago
10 hours 6 min ago
13 hours 53 min ago
15 hours 7 min ago
18 hours 43 min ago
1 day 1 hour ago
1 day 10 hours ago
1 day 12 hours ago
2 days 3 hours ago
2 days 5 hours ago