home · contact · privacy
Add etc files for web server.
[config] / all_new_2018 / linkable_etc_files / web / etc / iptables / rules.v4
1 *filter
2 :INPUT DROP [0:0]
3 :FORWARD DROP [0:0]
4 :OUTPUT ACCEPT [0:0]
5 # otherwise self-referential connections to local host will fail
6 -A INPUT -i lo -j ACCEPT
7 # tolerate any inbound connections requested by our server, no matter the port
8 -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
9 # this enables ping etc.
10 -A INPUT -p icmp -j ACCEPT
11 # SSH
12 -A INPUT -p tcp --dport 22 -j ACCEPT
13 # HTTP
14 -A INPUT -p tcp --dport 80 -j ACCEPT
15 # HTTPS
16 -A INPUT -p tcp --dport 443 -j ACCEPT
17 COMMIT
18 # this last line is here because iptables-restore ignores the final command if no newline follows it