home · contact · privacy
3e518d5079c9cba91c032c06ebdd35e82e956cbe
[config] / all_new_2018 / linkable_etc_files / server / 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 # this enables ping etc.
8 -A INPUT -p icmp -j ACCEPT
9 # SSH
10 -A INPUT -p tcp --dport 22 -j ACCEPT
11 # HTTP; uncomment for creating LetsEncrypt certificates in standalone mode.
12 #-A INPUT -p tcp --dport 80 -j ACCEPT
13 # SMTP (allowing for STARTTLS); necessary for mail server to mail server banter
14 # HTTPS in theory, in practice my second SSH port, see sshd_config
15 -A INPUT -p tcp --dport 443 -j ACCEPT
16 # SMTP (allowing for STARTTLS); necessary for mail server to mail server banter
17 -A INPUT -p tcp --dport 25 -j ACCEPT
18 # SMTPS, for mail server to mail user agent communication
19 -A INPUT -p tcp --dport 465 -j ACCEPT
20 # IMAPS
21 -A INPUT -p tcp --dport 993 -j ACCEPT
22 # tolerate any inbound connections requested by our server, no matter the port
23 -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
24 COMMIT
25 # this last line is here because iptables-restore ignores the final command if no newline follows it