-
Notifications
You must be signed in to change notification settings - Fork 1
/
iptable_settings.sh
34 lines (27 loc) · 1.07 KB
/
iptable_settings.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/system/bin/sh
iptables -X
iptables -F
#iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 30022 -j ACCEPT
#httpd
iptables -A INPUT -p tcp --dport 20080 -j ACCEPT
#aria2
iptables -A INPUT -p tcp --dport 6900 -j ACCEPT
iptables -A INPUT -p tcp --dport 6901 -j ACCEPT
iptables -A INPUT -p tcp --dport 51413 -j ACCEPT
iptables -A INPUT -p tcp --dport 51414 -j ACCEPT
#iptables -A INPUT -p tcp -i ppp+ --dport 8200 -j DROP
iptables -A INPUT -p tcp -i ppp+ --dport 1:65535 -m state --state NEW -j DROP
ip6tables -X
ip6tables -F
#ip6tables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
ip6tables -A INPUT -p tcp --dport 30022 -j ACCEPT
#httpd
iptables -A INPUT -p tcp --dport 20080 -j ACCEPT
#aria2
iptables -A INPUT -p tcp --dport 6900 -j ACCEPT
iptables -A INPUT -p tcp --dport 6901 -j ACCEPT
iptables -A INPUT -p tcp --dport 51413 -j ACCEPT
iptables -A INPUT -p tcp --dport 51414 -j ACCEPT
#ip6tables -A INPUT -p tcp -i ppp+ --dport 8200 -j DROP
ip6tables -A INPUT -p tcp -i ppp+ --dport 1:65535 -m state --state NEW -j DROP