X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;ds=sidebyside;f=all_new_2018%2Flinkable_etc_files%2Fserver%2Fetc%2Fiptables%2Frules.v4;h=7eff1b0d1f969f7cec333eca9a65d96fadb77d66;hb=f2a01cfd1fb4fc2510ce1df00def189a10be42d7;hp=01dca753763dc25509bc048a947eb2c9a3f59a08;hpb=86f4b75d0db3806188b2720776a9ce8b0db63d59;p=config diff --git a/all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4 b/all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4 index 01dca75..7eff1b0 100644 --- a/all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4 +++ b/all_new_2018/linkable_etc_files/server/etc/iptables/rules.v4 @@ -2,11 +2,23 @@ :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [0:0] +# otherwise self-referential connections to local host will fail -A INPUT -i lo -j ACCEPT +# this enables ping etc. -A INPUT -p icmp -j ACCEPT +# SSH -A INPUT -p tcp --dport 22 -j ACCEPT +# HTTP; uncomment for creating LetsEncrypt certificates in standalone mode. +#-A INPUT -p tcp --dport 80 -j ACCEPT +# HTTPS in theory, in practice my second SSH port, see sshd_config -A INPUT -p tcp --dport 443 -j ACCEPT --A INPUT -p tcp --dport 80 -j ACCEPT +# SMTP (allowing for STARTTLS); necessary for mail server to mail server banter +-A INPUT -p tcp --dport 25 -j ACCEPT +# SMTPS, for mail server to mail user agent communication +-A INPUT -p tcp --dport 465 -j ACCEPT +# IMAPS +-A INPUT -p tcp --dport 993 -j ACCEPT +# tolerate any inbound connections requested by our server, no matter the port -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT COMMIT -# iptables-restore seems to ignore COMMIT if no newline follows it \ No newline at end of file +# this last line is here because iptables-restore ignores the final command if no newline follows it \ No newline at end of file