$ nmap localhost
Starting Nmap 5.51 ( http://nmap.org ) at 2014-09-19 16:31 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00042s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
80/tcp open http
82/tcp open xfer
6000/tcp open X11
Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds
I have installed package iptables and modified
/etc/firewall.conf
$ cat /etc/firewall.conf
# /etc/firewall.conf: SliTaz firewall configuration.
# Config file used by: /etc/init.d/firewall.sh
#
# Network interface.
INTERFACE="eth0"
# Enable/disable kernel security.
KERNEL_SECURITY="yes"
# Enable/disable iptables rules (iptables package must be installed).
IPTABLES_RULES="yes"
# Netfilter/iptables rules.
# This shell function is included in /etc/init.d/firewall.sh
# to start iptables rules.
#
iptables_rules()
{
# Drop all input connections.
iptables -P INPUT DROP
# Drop all output connections.
iptables -P OUTPUT DROP
# Drop all forward connections.
iptables -P FORWARD DROP
# Accept near all output trafic.
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# Accept unprivileged ports.
iptables -A INPUT -i $INTERFACE -p udp --destination-port 1024:65535 -j ACCEPT
# Accept ping.
iptables -A INPUT -i $INTERFACE -p icmp -j ACCEPT
# Accept input trafic only for connections initialized by user.
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# Accept input on localhost (127.0.0.1).
iptables -A INPUT -i lo -j ACCEPT
}
Then restarted the firewall by doing
/etc/init.d/firewall restart
but as you can see por 80 is still open.