Ubuntu LXC Port Forwarding
sudo iptables -t nat -I PREROUTING -p tcp -d $PUBLICIP --dport 80 -j DNAT --to 10.0.0.1:80
sudo iptables -A FORWARD -p tcp -d 10.0.0.1 --dport 80 -j ACCEPT
Written on June 29, 2015
Ubuntu experience.
Wait for it …
sudo iptables -t nat -I PREROUTING -p tcp -d $PUBLICIP --dport 80 -j DNAT --to 10.0.0.1:80
sudo iptables -A FORWARD -p tcp -d 10.0.0.1 --dport 80 -j ACCEPT
Ad: DigitalOcean is a simple cloud hosting built for developers. Get 2 months free!