How to open Port 22 at Firewall Level Linux?


Edit your firewall script and append the following rule to restrict access to 192.168.1.0/24:

/sbin/iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p  cp --dport 22 -j ACCEPT

Save and close the file. OR, you can type the command as follows and save it to your firewall config file:

# /sbin/iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
# iptables-save > /path/to/your.firewall.conf

Source: http://www.cyberciti.biz

Tags: , , ,

Comments & Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

*


6 × = 42

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>