Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
Acris committed Feb 27, 2020
1 parent c2dc1e3 commit 0e4964f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/apply_iptables_rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ get_lan_subnet() {

_lan_ipaddr="${_lan_ipaddr%.*}.0"

echo $_lan_ipaddr/$(mask2cdr $_lan_netmask)
echo "$_lan_ipaddr"/$(mask2cdr "$_lan_netmask")
}

modprobe ip_set
Expand Down Expand Up @@ -124,6 +124,8 @@ local_redir_port=$(cat ${SS_MERLIN_HOME}/etc/shadowsocks/config.json | grep 'loc
if [[ ! ${lan_ips} || ${lan_ips} == '0.0.0.0/0' ]]; then
lan_ips=$(get_lan_subnet)
fi
echo "LAN IPs are ${lan_ips}"

if iptables -t nat -N SHADOWSOCKS_TCP 2>/dev/null; then
# TCP rules
iptables -t nat -N SS_OUTPUT
Expand Down

0 comments on commit 0e4964f

Please sign in to comment.