1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

Enable masquerade only when "$lan" != "none"

This commit is contained in:
A Holt 2019-05-23 11:25:55 -04:00 committed by GitHub
parent 98049544b1
commit 7fa7d1d40a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,10 +15,10 @@ IPTABLES_DATA=/etc/sysconfig/iptables
source {{ iiab_env_file }}
lan=$IIAB_LAN_DEVICE
wan=$IIAB_WAN_DEVICE
network_mode=`grep iiab_network_mode_applied {{ iiab_ini_file }} | gawk '{print $3}'`
echo -e "\nLAN: $lan"
echo -e "WAN: $wan"
echo -e "Network Mode: $network_mode\n"
#network_mode=`grep iiab_network_mode_applied {{ iiab_ini_file }} | gawk '{print $3}'`
#echo -e "Network Mode: $network_mode\n"
# "Good thing we replace this file; should be treated like Squid below" ?
ports_externally_visible={{ ports_externally_visible }}
@ -164,7 +164,7 @@ if [ "$wan" != "none" ]; then
fi
# Typically False, to keep client machines (e.g. students) off the Internet
if [ "$iiab_gateway_enabled" == "True" ]; then
if [ "$iiab_gateway_enabled" == "True" ] && [ "$lan" == "none" ]; then
$IPTABLES -A POSTROUTING -t nat -o $wan -j MASQUERADE
fi