LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh port & iptables (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-port-and-iptables-4175431973/)

uk.engr 10-13-2012 02:34 AM

ssh port & iptables
 
Assalam o Alaikum

I have changed port of ssh to 972. Now I can only access when i disable iptbales. I want to make iptables to allow port 972 for ssh it tried following but nothing happens

iptables -A INPUT -p tcp --dport 972 -j ACCEPT

acid_kewpie 10-13-2012 03:17 PM

your best bet is to open /etc/sysconfig/iptables and change the line for port 22 to 972 and reload the iptables service. Just doing that addition will put it after the default blocking rules.


All times are GMT -5. The time now is 05:40 PM.