enable iptables firewall on linux
- by user13278061
Here is a very basic set of instruction to setup a simple iptables firewall configuration on linux (redhat)
Enable firewall
log as root thenenter the following command, it launch a text gui
#> setup
first screen: Choose firewall configuration
second screen: choose "Enabled" then "Customize"
third screen: select you interface in "Trusted Devices", select "Allow Incoming" for "SSH" "Telnet" "FTP" (add eventually other ports, then press "OK" (2 times, then "Quit")
At that point the firewall is enabled. You can start/stop/monitor using service iptables start/stop/status
Change timeout
to changed the tcp established connection timeout
#> echo 120 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
Monitor connection in iptables tables
for example if you want to track a connection establish from a host 152.68.65.207
#> cat /proc/net/ip_conntrack |grep 152.68.65.207