ross1
By:
ross1

Firewall appears in place, but no iptables rules found

June 30, 2013 2.1k views
According to nmap, my droplet has ports 22,25,80,554 and 7070 open, the rest are closed. But when I run iptables, there are no rules defined (see below). How do I configure the firewall rules for my droplet? Thanks for any assistance. root@devi2:~# for t in filter mangle nat raw ; do iptables -t $t -vnL ; done Chain INPUT (policy ACCEPT 73691 packets, 3651K bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 74211 packets, 3903K bytes) pkts bytes target prot opt in out source destination Chain PREROUTING (policy ACCEPT 152 packets, 11500 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 152 packets, 11500 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 149 packets, 24128 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 149 packets, 24128 bytes) pkts bytes target prot opt in out source destination Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 1 packets, 652 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 1 packets, 652 bytes) pkts bytes target prot opt in out source destination Chain PREROUTING (policy ACCEPT 152 packets, 11500 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 147 packets, 22680 bytes) pkts bytes target prot opt in out source destination
2 Answers
We do not block any ports by default. I believe the reason why nmap shows only the ports you mentioned is because there isn't anything listening on the other ports so they appear as closed.
Have another answer? Share your knowledge.