(Created page with "== Linux == Linux typically uses IPTables for its firewall. On most modern Linux distributions, IPTables is controlled through another program or manager such as firewalld, or...")
(No difference)

Revision as of 14:03, 9 October 2019

Linux

Linux typically uses IPTables for its firewall. On most modern Linux distributions, IPTables is controlled through another program or manager such as firewalld, or CSF.

Opening a Port

To allow a specific port access to your machine, you will (most likely) need to make IPTables ACCEPT traffic meeting the port criteria on the INPUT chain.

Simple IPTables:

# iptables -A INPUT -p tcp --dport 80 -j ACCEPT

If using Red Hat's firewalld:

# firewall-cmd --permanent --add-port=80/tcp
# firewall-cmd --permanent --add-service=x
## Reload firewall rules
# firewall-cmd --reload

If using CSF:

# vi /etc/csf/csf.conf
## Edit 'TCP_IN' to include any TCP traffic IN, or TCP_OUT for traffic out.
## Reload CSF
# csf -r