ubin/nat-start.sh

17 lines
233 B
Bash
Raw Normal View History

2020-03-06 14:58:17 +00:00
#!/bin/bash
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
2020-03-06 14:58:17 +00:00
iptables -P FORWARD ACCEPT
sysctl -w net.ipv4.ip_forward=1