mirror of https://github.com/aredn/aredn.git
Fix firewall rules. (#1041)
1. Allow wireguard tunnels in iface mesh setup (treat like vtuns) 2. Fix incorrectly setting up dtd/wifi to wan rules
This commit is contained in:
parent
56043e0e0b
commit
509d475133
|
@ -50,7 +50,7 @@ if [ "$ACTION" = "ifup" ] ; then
|
|||
|
||||
echo "Setting routing rules."
|
||||
|
||||
if [ "$INTERFACE" == "wifi" ] || [ "$INTERFACE" == "dtdlink" ] || [ "${INTERFACE:0:3}" = "tun" ] || [ "$xlink" != "" ]; then
|
||||
if [ "$INTERFACE" == "wifi" ] || [ "$INTERFACE" == "dtdlink" ] || [ "${INTERFACE:0:3}" = "tun" ] || [ "${INTERFACE:0:2}" = "wg" ] || [ "$xlink" != "" ]; then
|
||||
if [ "$(/sbin/uci -q get aredn.@dmz[0].mode)" != "0" ] ; then
|
||||
ip rule add pref 20010 iif $DEVICE lookup 29
|
||||
fi
|
||||
|
|
|
@ -584,7 +584,7 @@ if fw then
|
|||
fw:write("\nconfig 'include'\n option 'path' '/etc/firewall.natmode'\n option 'reload' '1'\n")
|
||||
end
|
||||
|
||||
if c:get("aredn", "@wan[0]", "olsrd_gw") == "1" then
|
||||
if nc:get("aredn", "@wan[0]", "olsrd_gw") == "1" then
|
||||
fw:write("\nconfig forwarding\n option src wifi\n option dest wan\n")
|
||||
fw:write("\nconfig forwarding\n option src dtdlink\n option dest wan\n")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue