diff options
Diffstat (limited to 'core/conf/iptables/ipt-conf.sh')
-rw-r--r-- | core/conf/iptables/ipt-conf.sh | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/core/conf/iptables/ipt-conf.sh b/core/conf/iptables/ipt-conf.sh index cc51f12..8d57f5f 100644 --- a/core/conf/iptables/ipt-conf.sh +++ b/core/conf/iptables/ipt-conf.sh @@ -6,24 +6,42 @@ IPT6="/usr/sbin/ip6tables" SPAMLIST="/etc/iptables/blockedip" SPAMDROPMSG="BLOCKED IP: " +#TYPE=bridge +#TYPE=server +#TYPE=open +TYPE=client + # bridge interface with interface facing gateway #BR_IF="br0" + # bridge ip network address BR_NET="10.0.0.0/8" +#BR_NET="192.0.0.0/8" +# static wifi ip network address +#WIFI_NET="10.0.0.0/8" + # network gateway -GW="10.0.0.1" -# external dns -#DNS="212.55.154.174" -DNS="10.0.0.254" +#GW="10.0.0.1" +GW=$(ip route | grep "default via" | cut -d " " -f 3) -# static machine ip address -PUB_IP="10.0.0.4" +# external dns +#DNS="10.0.0.254" +#DNS=$(grep -m 1 "nameserver " /etc/resolv.conf | cut -d " " -f 2) +DNS=$(grep -m 1 "^server=" /etc/dnsmasq.conf | cut -d "=" -f 2) # public interface facing gateway -PUB_IF="ens3" +#PUB_IF="wlp9s0" +PUB_IF="enp7s0" # wifi interface #WIFI_IF="wlp7s0" -# static wifi ip network address -#WIFI_NET="10.0.0.0/8" +# static machine ip address +#PUB_IP="10.0.0.4" +# deserve much better :( +PUB_IP=$(ifconfig ${PUB_IF} | grep -m 1 "addr:" | cut -d " " -f 12 | cut -d ":" -f 2) + +echo "GW: ${GW}" +echo "DNS: ${DNS}" +echo "PUB_IF: ${PUB_IF}" +echo "PUB_IP: ${PUB_IP}" |