Add iptables/nftables test.

pull/29/head
necro-nemesis 6 years ago
parent f279c1c3d8
commit e08fce2041

@ -218,22 +218,22 @@ function default_configuration() {
# #RASPAP is for removal # #RASPAP is for removal
# select iptables or nftables # select iptables or nftables
# function networktables() { function networktables() {
# if [ ! -f /usr/sbin/iptables-nft ]; then if [ ! -f /usr/sbin/iptables-nft ]; then
# tablerouteA='iptables -t nat -A POSTROUTING -s 10.3.141.0\/24 -o lokitun0 -j MASQUERADE #RASPAP' tablerouteA='iptables -t nat -A POSTROUTING -s 10.3.141.0\/24 -o lokitun0 -j MASQUERADE #RASPAP'
# tablerouteB='iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP' tablerouteB='iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP'
# fi fi
# sudo apt-get -y install nftables sudo apt-get -y install nftables
# tablerouteA='nft add rule ip nat POSTROUTING oifname "lokitun0" ip saddr 10.3.141.0\/24 counter masquerade #RASPAP' tablerouteA='nft add rule ip nat POSTROUTING oifname "lokitun0" ip saddr 10.3.141.0\/24 counter masquerade #RASPAP'
# tablerouteB='nft add rule ip nat POSTROUTING counter masquerade #RASPAP' tablerouteB='nft add rule ip nat POSTROUTING counter masquerade #RASPAP'
# } }
lines=( lines=(
'echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward #RASPAP' 'echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward #RASPAP'
'iptables -t nat -A POSTROUTING -s 10.3.141.0\/24 -o lokitun0 -j MASQUERADE #RASPAP' #'iptables -t nat -A POSTROUTING -s 10.3.141.0\/24 -o lokitun0 -j MASQUERADE #RASPAP'
'iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP' #'iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP'
#echo $tablerouteA "$tablerouteA"
#echo $tablerouteB "$tablerouteB"
'sudo \/var\/lib\/lokinet\/.\/lokilaunch.sh start #RASPAP' 'sudo \/var\/lib\/lokinet\/.\/lokilaunch.sh start #RASPAP'
) )

Loading…
Cancel
Save