How do I uninstall and disable APF Firewall script under CentOS / Red Hat Enterprise Linux without breaking anything else?
Q. I’ve CentOS Linux server configured with APF firewall. How do I open port 22 from specific IP address only? I’ve fix static ADSL IP address assgined and I’d like to open port 22 from my IP 220.127.116.11 only using APF firewall script. How do I configure firewall?
Continue reading “APF Linux Firewall Open Port 22 From Specific / Selected IP Address Only”
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:
Add port 2346 (keep all other ports):
Close and save the file. Restart firewall:
# /etc/init.d/apf restart