Remove "Flush exiting rules" and "Set default policies" from
iptables_init.sh
This commit is contained in:
parent
11585765d1
commit
e630b0c0e0
@ -1,19 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Flush existing rules
|
|
||||||
iptables -F
|
|
||||||
ip6tables -F
|
|
||||||
iptables -t nat -F
|
|
||||||
ip6tables -t nat -F
|
|
||||||
|
|
||||||
# Set default policies
|
|
||||||
iptables -P INPUT ACCEPT
|
|
||||||
iptables -P FORWARD ACCEPT
|
|
||||||
iptables -P OUTPUT ACCEPT
|
|
||||||
ip6tables -P INPUT ACCEPT
|
|
||||||
ip6tables -P FORWARD ACCEPT
|
|
||||||
ip6tables -P OUTPUT ACCEPT
|
|
||||||
|
|
||||||
# Apply IPv4 rules
|
# Apply IPv4 rules
|
||||||
iptables -t nat -A PREROUTING -i enX0 -p tcp --dport 443 -j REDIRECT --to-ports 4443
|
iptables -t nat -A PREROUTING -i enX0 -p tcp --dport 443 -j REDIRECT --to-ports 4443
|
||||||
iptables -t nat -A PREROUTING -i enX0 -p tcp --dport 80 -j REDIRECT --to-ports 4443
|
iptables -t nat -A PREROUTING -i enX0 -p tcp --dport 80 -j REDIRECT --to-ports 4443
|
||||||
|
Loading…
Reference in New Issue
Block a user