New to iptables and firewalls in general and I have a question: Just installed Centos 6.8. Used system-config-firewall-tui to configure the firewall. Then I added SSH as a trusted service, and added option for packets to be allowed on tcp:8080. When I ran iptables -L i get:
Code: Select all
[user@localhost ~]$ sudo iptables -L --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
2 ACCEPT icmp -- anywhere anywhere
3 ACCEPT all -- anywhere anywhere
4 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
5 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:webcache
6 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Isn't it going to allow all packets sent to this machine? (Seems like it doesn't though when I remove SSH option in system-config-firewall-tui I can't use ssh anymore)