Archive

Archive for March, 2017

Own Notes – Iptables

24 March 2017 Leave a comment

Allow Incoming SSH only from a Specific Network

    The following rules allow incoming ssh connections only from 192.168.100.0/24 network

    root@home# iptables -A INPUT -i eth0 -p tcp -s 192.168.100.0/24 --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
    root@home# iptables -A OUTPUT -o eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT

Read more…