From e4551d6b59317bb27df5d2bd9c3f1ea6469e089b Mon Sep 17 00:00:00 2001
From: Silvino Silva
You can use +
For more information about iptables read + arch wiki. + You can use iptables script at boot time and iptables-save and iptables-restore tools to configure nat and filtering;
@@ -62,6 +64,7 @@ SERVICES=(lo iptables net crond) +
Configure your resolver with a server that don't censorship there for @@ -81,7 +84,22 @@ # chattr +i /etc/resolv.conf -
+ # ip link + # ip addr flush dev ${DEV} + # ip route flush dev ${DEV} ++ +
+ # ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast + + # ip link set ${DEV} up + # ip route add default via ${GW} ++ + +
There is more information on Wiki Wifi Start Scripts and @@ -99,11 +117,7 @@ # iwconfig wlp2s0 essid NAME key s:ABCDE12345 -
- # ip addr add 192.168.1.65 dev wlp2s0 -- -
Configure wpa supplicant edit;
@@ -133,7 +147,7 @@ init script to auto load wpa configuration and dhcp client. -# wpa_cli @@ -146,7 +160,7 @@
- > set_network 3 ssid "Valcovo-Network" + > set_network 3 ssid "Crux-Network" OK@@ -173,21 +187,7 @@ -
- # ip link - # ip addr flush dev ${DEV} - # ip route flush dev ${DEV} -- -
- # ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast + - # ip link set ${DEV} up - # ip route add default via ${GW} -- -
Sysctl references Arch TCP/IP stack hardening, @@ -203,9 +203,9 @@ kernel.printk = 1 4 1 7 # Disable ipv6 - net.ipv6.conf.all.disable_ipv6 = 1 - net.ipv6.conf.default.disable_ipv6 = 1 - net.ipv6.conf.lo.disable_ipv6 = 1 + net.ipv6.conf.all.disable_ipv6 = 1 + net.ipv6.conf.default.disable_ipv6 = 1 + net.ipv6.conf.lo.disable_ipv6 = 1 # Tuen IPv6 # net.ipv6.conf.default.router_solicitations = 0 @@ -263,7 +263,7 @@ net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 - # Act as a router, necessary for Access Point + # Don't act as a router net.ipv4.ip_forward = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 diff --git a/core/scripts/iptables.sh b/core/scripts/iptables.sh index b450bb3..9fb2872 100644 --- a/core/scripts/iptables.sh +++ b/core/scripts/iptables.sh @@ -1,9 +1,9 @@ #!/bin/sh # -# XXXXXXXXXXXXXXXXXX -# XXX Network XXX -# XXXXXXXXXXXXXXXXXX +# XXXXXXXXXXXXXXXXX +# XXXX Network XXXX +# XXXXXXXXXXXXXXXXX # + # | # v @@ -32,9 +32,9 @@ # |chain: OUTPUT | +--------+----------+ # +--------------+ | # v -# XXXXXXXXXXXXXXXXXX -# XXX Network XXX -# XXXXXXXXXXXXXXXXXX +# XXXXXXXXXXXXXXXXX +# XXXX Network XXXX +# XXXXXXXXXXXXXXXXX # # iptables [-t table] {-A|-C|-D} chain rule-specification # @@ -161,6 +161,11 @@ iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X +iptables -t raw -F +iptables -t raw -X +iptables -t security -F +iptables -t security -X + echo "Starting ipv4 firewall filter table..." @@ -169,7 +174,7 @@ iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT DROP -#unlimited +# Unlimited on local $IPT -A INPUT -i lo -j ACCEPT $IPT -A OUTPUT -o lo -j ACCEPT -- cgit 1.4.1-2-gfad0