diff --git a/ip6t-firewall-gateway b/ip6t-firewall-gateway index cd1a369..4ccf2a7 100755 --- a/ip6t-firewall-gateway +++ b/ip6t-firewall-gateway @@ -99,6 +99,20 @@ else source $conf_post_declarations fi +# --- +# - IPv6 Addresses Gateway +# --- + +#_ips="$(ip -6 a | grep "inet6 " | awk '{print$2}' | cut -d'/' -f1)" +_ips="$(ip -6 a | grep "inet6 " | grep -v -E "(\s+fd|\s+fe80)" | awk '{print$2}' | cut -d'/' -f1)" + +declare -a gateway_ipv6_address_arr=() +if [[ -n "$_ips" ]] ; then + for _ip in $_ips ; do + gateway_ipv6_address_arr+=("$_ip") + done +fi + echo if $terminal ; then diff --git a/ipt-firewall-gateway b/ipt-firewall-gateway index c8e1b2c..accb30b 100755 --- a/ipt-firewall-gateway +++ b/ipt-firewall-gateway @@ -99,6 +99,19 @@ else source $conf_post_declarations fi +# --- +# - IPv4 Addresses Gateway +# --- + +_ips="$(ip -4 a | grep "inet " | awk '{print$2}' | cut -d'/' -f1)" + +declare -a gateway_ipv4_address_arr=() +if [[ -n "$_ips" ]] ; then + for _ip in $_ips ; do + gateway_ipv4_address_arr+=("$_ip") + done +fi + echo if $terminal ; then