|
@@ -126,13 +126,13 @@ function firewall_deny_forwarding {
|
126
|
126
|
}
|
127
|
127
|
|
128
|
128
|
function firewall_allow_forwarding {
|
129
|
|
- curr_ipv4_address=$(get_external_ipv4_address)
|
|
129
|
+ curr_external_ipv4_address=$(get_external_ipv4_address)
|
130
|
130
|
iptables -A INPUT -i ${FIREWALL_EIFACE} -m state --state NEW -p udp --dport 1194 -j ACCEPT
|
131
|
131
|
iptables -A INPUT -i tun+ -j ACCEPT
|
132
|
132
|
iptables -A FORWARD -i tun+ -j ACCEPT
|
133
|
133
|
iptables -A FORWARD -i tun+ -o ${FIREWALL_EIFACE} -m state --state RELATED,ESTABLISHED -j ACCEPT
|
134
|
134
|
iptables -A FORWARD -i ${FIREWALL_EIFACE} -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
|
135
|
|
- iptables -t nat -A POSTROUTING -s ${curr_ipv4_address}/24 -o ${FIREWALL_EIFACE} -j MASQUERADE
|
|
135
|
+ iptables -t nat -A POSTROUTING -s ${curr_external_ipv4_address}/24 -o ${FIREWALL_EIFACE} -j MASQUERADE
|
136
|
136
|
iptables -A OUTPUT -o tun+ -j ACCEPT
|
137
|
137
|
write_config_param EXTERNAL_IPV4_ADDRESS "$curr_external_ipv4_address"
|
138
|
138
|
save_firewall_settings
|