Home > OS >  The iptables rules HTTP redirection returns a 403 error
The iptables rules HTTP redirection returns a 403 error

Time:12-09

Use the following iptables rules will access 183.230.40.192 redirected to 117.185.16.31,
 iptables -t NAT - A forwardrule - d 183.230.40.192 -m MAC - MAC - source E0: DB: let 55:9 F: 2 d -p TCP -- dport 80 - j DNAT - to - destination 117.185.16.31:80 

When the browser to access 183.230.40.192, there is a match to see the iptables rules, but the browser returns a 403 error


Found that in wireshark caught the iptables rules, although the destination IP address changed 117.185.16.31, but the Host HTTP message header fields or 183.230.40.192, cause the server refused to respond to cause a 403 error,

Iptables rules is only changed the destination IP address, but I didn't modify the application layer HTTP message first Host fields, cause the failure of redirection, could you tell me how to solve this problem,
  • Related