How to: Open Ssh Port 22 on Linux APF Firewall under CentOS / RHEL
Q. I'd like to change ssh port from 22 to 2346. I changes the ssh port and reloaded OpenSSH but didn't get through my firewall. I'm using APF firewall script under cPanel control panel? How do I open port 2346?
A. By default APF configured via /etc/apf/conf.apf file. All you have to do is login as the root and specify port number.
Open port 2346 using APF
Login as the root
Open config file /etc/apf/conf.apf
# vi /etc/apf/conf.apf
Find line that read as follows:
IG_TCP_CPORTS
Add port 2346 (keep all other ports):
IG_TCP_CPORTS="2346,22,25,53,80,443,993,904,...."
Close and save the file. Restart firewall:
# /etc/init.d/apf restart
E-mail this to a friend
Printable version
Related Other Helpful FAQs:
- Open ftp port 21 on windows XP operating system
- How to: Allow telnet and ssh through iptables under Linux
- Redhat / CentOS / Fedora Linux Open Port
- APF Linux Firewall Open Port 22 From Specific / Selected IP Address Only
- How do I block an IP on my Linux server?
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: /etc/apf/conf.apf, /etc/init.d/apf restart, apf open port, control panel, cPanel apf open port, firewall, open port, ports, tcp



Recent Comments
Yesterday ~ 3 Comments
Yesterday ~ 7 Comments
Yesterday ~ 4 Comments
Yesterday ~ 8 Comments
Yesterday ~ 45 Comments