# Now, to forward port 9999 on host to port 80 on host
# we need to add the following rules to the iptables configuration of host
sudo iptables -t nat -A PREROUTING -p tcp --dport 9999 -j DNAT --to-destination
sudo iptables -t nat -A POSTROUTING -p tcp -d --dport 80 -j SNAT --to-source
sudo iptables -t nat -L -n



./socat TCP4-LISTEN:local_port,fork TCP4:remote_ip:remote_port


Leave a Reply

Your email address will not be published. Required fields are marked *