Useful (for me) collection of small shell scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
233 B

#!/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
iptables -P FORWARD ACCEPT
sysctl -w net.ipv4.ip_forward=1