X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=all_new_2018%2Flinkable_etc_files%2Fserver%2Fetc%2Fiptables%2Frules.v4;h=6899ef68078f8ff4aacf9819a04d516858b91e19;hb=2279599a597e4dac6e5892670847ef977513b110;hp=f56878949562613bf3bdbadfb618d851c26a5481;hpb=d57ddacf1935302793b7e11f5ab1ea8fbda51a09;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 f568789..6899ef6 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,10 +2,15 @@ :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 +# tolerate any inbound connections requested by our server, no matter the port +-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT +# this enables ping etc. -A INPUT -p icmp -j ACCEPT +# SSH -A INPUT -p tcp --dport 22 -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 --A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -COMMIT \ No newline at end of file +COMMIT +# this last line is here because iptables-restore ignores the final command if no newline follows it \ No newline at end of file