i have to configure my server to redirect from 80 and 443 port due to 8443 using iptables

          -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
          -A INPUT -p tcp -m tcp --dport 8443 -j ACCEPT
          -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
          -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
          -A PREROUTING -i eth0 -p tcp -m tcp --dport 80:443 -j REDIRECT --to-ports 8443

when i browse like https protocol everything is working, but when from http, i can just donwnload a file, and don't see anything

有帮助吗?

解决方案

8443 port is intended mainly to use as HTTPS proxy. Sending plain HTTP to this port will not work. You should keep separated HTTP and HTTPS traffic by sending them to a different port (normally 8080) of your transparent proxy.

其他提示

using this rule : -A PREROUTING -i eth0 -p tcp -m tcp --dport 80:443 -j REDIRECT --to-ports 8443

you allowed only incoming traffic to to be sent to port 8443, but still the outgoing traffic needs to be routed

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top