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:
parent
98049544b1
commit
7fa7d1d40a
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue