hi guys
i have a simple question !
i have two ips . a valid and internal(172.16.11.2)
i want to use port forwarding to forward any request to valid IP port 8001 to internal ip port 80 .
i use this rule :
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport 8001 -j DNAT --to-destination 172.16.11.2:80
iptables -t nat -A POSTROUTING -p tcp --dport 80 -j MASQUERADE
there is a problem !
sometime on my apache server http changes to https in some pages ! in this situation redirection does not work !and https page wont load !
how can i fix that !!
or is there any way to forward port to a ip address ??
for example : any request to port 8001 redirect to a ip address ???