Ubuntu Pastebin

Paste from zack at Wed, 24 Jun 2015 09:29:43 +0000

Download as text
1
2
3
4
5
#!/bin/bash
for i in $(sudo ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'); do
        sudo iptables -t nat -I PREROUTING 1 -d $i -p tcp --dport 80 -j DNAT --to $i:8080
        sudo iptables -t nat -I PREROUTING 1 -d $i -p tcp --dport 443 -j DNAT --to $i:8443
done
Download as text