Skip to content

Commit

Permalink
Update run.sh
Browse files Browse the repository at this point in the history
Prevent matches for inet6 (`grep 'inet '`)
  • Loading branch information
mattlongman committed Jun 22, 2022
1 parent 8582131 commit 156ee04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hassio-access-point/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function cleanup_iptables() {
iptables -D FORWARD -i $INTERFACE -o $BASE_INTERFACE -d ${wifi_net} -j DROP
fi
fi
eth_net=$(ip addr show eth0 | grep inet | awk '{print $2}')
eth_net=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}')
if [ ${#eth_net} -ne 0 ]; then
iptables -D FORWARD -i $INTERFACE -o eth0 -d ${eth_net} -j DROP
fi
Expand Down Expand Up @@ -289,7 +289,7 @@ if [ $ISOLATION -eq 1 ]; then
fi
fi
# Prevent access to local eth network from AP network
eth_net=$(ip addr show eth0 | grep inet | awk '{print $2}')
eth_net=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}')
if [ ${#eth_net} -ne 0 ]; then
iptables -I FORWARD -i $INTERFACE -o eth0 -d ${eth_net} -j DROP
fi
Expand Down

0 comments on commit 156ee04

Please sign in to comment.