From 6745a213248cf4ca6f5897d6fb1d2e19f0ded77c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 25 Sep 2017 11:37:15 +0100 Subject: [PATCH] External --- src/freedombone-utils-firewall | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-utils-firewall b/src/freedombone-utils-firewall index d2f28188..7ebc5a4f 100755 --- a/src/freedombone-utils-firewall +++ b/src/freedombone-utils-firewall @@ -126,13 +126,13 @@ function firewall_deny_forwarding { } function firewall_allow_forwarding { - curr_ipv4_address=$(get_external_ipv4_address) + curr_external_ipv4_address=$(get_external_ipv4_address) iptables -A INPUT -i ${FIREWALL_EIFACE} -m state --state NEW -p udp --dport 1194 -j ACCEPT iptables -A INPUT -i tun+ -j ACCEPT iptables -A FORWARD -i tun+ -j ACCEPT iptables -A FORWARD -i tun+ -o ${FIREWALL_EIFACE} -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i ${FIREWALL_EIFACE} -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT - iptables -t nat -A POSTROUTING -s ${curr_ipv4_address}/24 -o ${FIREWALL_EIFACE} -j MASQUERADE + iptables -t nat -A POSTROUTING -s ${curr_external_ipv4_address}/24 -o ${FIREWALL_EIFACE} -j MASQUERADE iptables -A OUTPUT -o tun+ -j ACCEPT write_config_param EXTERNAL_IPV4_ADDRESS "$curr_external_ipv4_address" save_firewall_settings