Merge branch 'master' of git.giomba.it:giomba/ubin

This commit is contained in:
giomba 2020-04-04 16:20:04 +02:00
commit a2a7f20811

View File

@ -1,6 +1,16 @@
#!/bin/bash
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
function echoerr {
>&2 echo $1
}
if [ -z $1 ]; then
echoerr "syntax:"
echoerr "# $0 <iface>"
exit 1
fi
iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE
iptables -P FORWARD ACCEPT
sysctl -w net.ipv4.ip_forward=1