Softwares ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Main /
IPTABLES-Prerouting-to-internal-network
IPTABLES Prerouting to internal networkIf you have a server on your internal network that you want make available externally, you can use the -j DNAT target of the PREROUTING chain in NAT to specify a destination IP address and port where incoming packets requesting a connection to your internal service can be forwarded. For example, if you want to forward incoming HTTP requests to your dedicated Apache HTTP Server at 192.168.1.10, use the following command: [root@myServer ~ ] # iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.1.10:80 This rule specifies that the nat table use the built-in PREROUTING chain to forward incoming HTTP requests exclusively to the listed destination IP address of 192.168.1.10. PREROUTING
Adding FORWARD Rule Also
|