Nathaly01: pour comparaison, voici le "netstat" de mon serveur, sur lequel aucun pare-feu n'est défini :
root@gibi:~# netstat -tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 3094/perl
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 19335/mysqld
tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN 3204/master
tcp 0 0 127.0.0.1:13419 0.0.0.0:* LISTEN 25812/ccnet-server
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 3016/dovecot
tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 25812/ccnet-server
tcp 0 0 127.0.0.1:8082 0.0.0.0:* LISTEN 25822/httpserver
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2390/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3204/master
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 4276/python2.7
tcp 0 0 0.0.0.0:12001 0.0.0.0:* LISTEN 25820/seaf-server
tcp 0 0 127.0.0.1:10050 0.0.0.0:* LISTEN 26054/zabbix_agentd
tcp 0 0 127.0.0.1:10051 0.0.0.0:* LISTEN 25987/zabbix_server
tcp 0 0 127.0.0.1:10052 0.0.0.0:* LISTEN 17021/sshd: autossh
tcp 0 0 127.0.0.1:10053 0.0.0.0:* LISTEN 5739/sshd: autossh
tcp6 0 0 :::143 :::* LISTEN 3016/dovecot
tcp6 0 0 :::80 :::* LISTEN 2489/nginx
tcp6 0 0 :::22 :::* LISTEN 2390/sshd
tcp6 0 0 :::25 :::* LISTEN 3204/master
tcp6 0 0 :::443 :::* LISTEN 2489/nginx
tcp6 0 0 ::1:10052 :::* LISTEN 17021/sshd: autossh
tcp6 0 0 ::1:10053 :::* LISTEN 5739/sshd: autossh
On constate que tout ce qui n'est pas nécessaire publiquement est en écoute uniquement sur 127.0.0.1. En public, tout ce qu'on trouve c'est :
- OpenSSH
- Dovecot (IMAP)
- Ccnet et seaf-server (Seafile, synchro de fichiers)
- Postfix (SMTP)
- NginX (HTTP et HTTPS)
Notons que je devrais installer la nouvelle version de Seafile, qui passe la synchro en HTTPS (un port de moins à ouvrir).
Un nmap de cette même machine donne ça :
➜ ~ nmap www.tiramiseb.fr
Starting Nmap 6.46 ( http://nmap.org ) at 2014-12-24 00:35 CET
Nmap scan report for www.tiramiseb.fr (5.135.176.134)
Host is up (0.037s latency).
rDNS record for 5.135.176.134: ns3283259.ip-5-135-176.eu
Not shown: 994 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
143/tcp open imap
443/tcp open https
10001/tcp open scp-config
Nmap done: 1 IP address (1 host up) scanned in 5.87 seconds
C'est cohérent.
Aucun de ces ports ne devrait être bloqué.
Donc pare-feu inutile.
Mais toi tu as besoin d'un pare-feu au moins pour la gestion de l'aspect "passerelle", bien sûr.