How to setup Firewall on Hiddify panel
What is a firewall?
Firewall refers to software or hardware that prevent access to computers or servers and control the traffic exchanged in the network. A firewall is actually a security tool that can be a software program or a dedicated network device. Here we are dealing with software firewall on Linux servers.
The firewall of Linux servers can be managed in several ways, one of these methods is using a tool called IP Tables.
In this tool, a series of rules can be defined, by using which information packets are allowed to pass through different protocols.
Automatic firewall settings through the panel
By default, Hiddify turns on and controls the system firewall. For example, if you change the TLS or HTTP protocols in the Settings, the panel will automatically create the necessary rules for them. Even if you change the SSH port, the panel detects the new port and automatically changes the firewall settings according to your needs.
The settings related to the firewall panel can be accessed from the Settings section, in the General Settings section.
Very important advice: Do not turn off the firewall panel. Turning off the firewall compromises your security.
Manual configuration of server firewall
-
If you need to open the port manually,
SSHto your server first. If you don't know how toSSH, see this tutorial. -
After
SSHconnection, you enter theHiddify menu. Here, exit this menu by pressingCancelorctrl+cto enter the terminal. If the menu is still displayed after this, type the wordclearand enter. -
Use the following command in the terminal.
- Just replace the desired port with
PORTin the above command. Suppose you want to open port1234. Just change the above command like this and enter it in the terminal.
- Although it is not recommended to open the
ICMPprotocol in terms of security, if you want to provide access to ping orICMPpackets; Just run the following command.
- Use the following command to drop the
ICMPprotocol.
- The work is done.