External
This commit is contained in:
parent
71add55175
commit
6745a21324
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue