-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathforce-failover.sh
More file actions
executable file
·14 lines (14 loc) · 1013 Bytes
/
Copy pathforce-failover.sh
File metadata and controls
executable file
·14 lines (14 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
iptables -F
iptables -I INPUT -p tcp -m state --state NEW,ESTABLISHED -j REJECT --reject-with tcp-reset
iptables -I OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j REJECT --reject-with tcp-reset
iptables -I FORWARD -p tcp -m state --state NEW,ESTABLISHED -j REJECT --reject-with tcp-reset
iptables -I INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
iptables -I OUTPUT -p udp -j REJECT --reject-with icmp-port-unreachable
iptables -I FORWARD -p udp -j REJECT --reject-with icmp-port-unreachable
sleep 60s
iptables -D INPUT -p tcp -m state --state NEW,ESTABLISHED -j REJECT --reject-with tcp-reset
iptables -D OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j REJECT --reject-with tcp-reset
iptables -D FORWARD -p tcp -m state --state NEW,ESTABLISHED -j REJECT --reject-with tcp-reset
iptables -D INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
iptables -D OUTPUT -p udp -j REJECT --reject-with icmp-port-unreachable
iptables -D FORWARD -p udp -j REJECT --reject-with icmp-port-unreachable