Edit firewall rule

Hi guys, how I can edit firewall rule, I want change from IP to my own IP for 8090 port.

If I trying add new rule for the same port, I have notice that this is double rule and cyberpanel cant create the new rule.

any solution?


Install CSF it is a better firewall

Thank you for your solution, but I don’t want better, I just looking how change IP with default firewall.

I also want to know where iptables is loading its rules from in presence of CSF?

Ok I have found the solution for how to block certain port on certain ip.

Things to note:

  • csf works by allowing one ip and/or port while blocking all others.
  • The fix was rather simple but i almost lost my server in process while trying to manually adjust iptables. It just wouldn’t work.
  • csf disables firewalld & modifies iptables rules by it self.

To allow certain port on one or range of ip’s do the following:

  1. Run

sudo nano /etc/csf/csf.allow

  1. Add entry like below to the above file. Format: tcp/udp|in/out|s/d=port|s/d=ip.
    Example: we want to block port 22 on one of the ip s/d equals source/destination (use wisely).


  1. Edit /etc/csf/csf.conf or if you have access to csf panel edit it there. Remove port under tcp_in or tcp_out

nano /etc/csf/csf.conf
find tcp_in port 22 and remove it