Bon, il y a du mieux ! 😃
Conformément à la documentation, j'ai adapté le fichier
/etc/shorewall/interfaces à ma connexion internet (pas de routeur, la carte ethernet est reliée à un simple modem, la connexion est paramétrée avec
pppoeconf).
Voici donc la fin du fichier
interfaces :
#
###############################################################################
#ZONE INTERFACE BROADCAST OPTIONS
net ppp0 - norfc1918,routefilter,tcpflags,logmartians,nosmurfs
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
Dans le répertoire
/usr/share/shorewall, j'ai supprimé les macros,
à l'exception des 6 macros suivantes : macro.AllowICMP macro.Auth macro.DropDNSrep macro.DropUPnP macro.Ping macro.SMB
Et voici le logs de démarrage qui s'affiche quand je tape « sudo shorewall start » :
Loading /usr/share/shorewall/functions...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Starting Shorewall...
Initializing...
Shorewall has detected the following iptables/netfilter capabilities:
NAT: Available
Packet Mangling: Available
Multi-port Match: Available
Extended Multi-port Match: Available
Connection Tracking Match: Available
Packet Type Match: Available
Policy Match: Not available
Physdev Match: Available
IP range Match: Available
Recent Match: Available
Owner Match: Available
Ipset Match: Not available
CONNMARK Target: Available
Connmark Match: Available
Raw Table: Available
CLASSIFY Target: Available
Determining Zones...
IPv4 Zones: net
Firewall Zone: fw
Validating interfaces file...
Validating hosts file...
Validating Policy file...
Determining Hosts in Zones...
net Zone: ppp0:0.0.0.0/0
Pre-processing Actions...
Pre-processing /usr/share/shorewall/action.Drop...
..Expanding Macro /usr/share/shorewall/macro.Auth...
..End Macro
..Expanding Macro /usr/share/shorewall/macro.AllowICMPs...
..End Macro
..Expanding Macro /usr/share/shorewall/macro.SMB...
..End Macro
..Expanding Macro /usr/share/shorewall/macro.DropUPnP...
..End Macro
..Expanding Macro /usr/share/shorewall/macro.DropDNSrep...
..End Macro
Pre-processing /usr/share/shorewall/action.Reject...
Pre-processing /usr/share/shorewall/action.Limit...
Deleting user chains...
Processing /etc/shorewall/routestopped ...
Creating Interface Chains...
Configuring Proxy ARP
Setting up NAT...
Setting up NETMAP...
Adding Common Rules
Adding Anti-smurf Rules
Enabling RFC1918 Filtering
Setting up TCP Flags checking...
Setting up Kernel Route Filtering...
Setting up Martian Logging...
Setting up IPSEC...
Processing /etc/shorewall/rules...
..Expanding Macro /usr/share/shorewall/macro.Ping...
Rule "REJECT net fw icmp 8 - - - -" added.
..End Macro
Rule "ACCEPT fw net icmp " added.
Rule "DROP net fw tcp 113 " added.
Processing Actions...
Generating Transitive Closure of Used-action List...
Processing /usr/share/shorewall/action.Drop for Chain Drop...
..Expanding Macro /usr/share/shorewall/macro.Auth...
Rule "REJECT - - tcp 113 - -" added.
..End Macro
Rule "dropBcast " added.
..Expanding Macro /usr/share/shorewall/macro.AllowICMPs...
Rule "ACCEPT - - icmp fragmentation-needed - -" added.
Rule "ACCEPT - - icmp time-exceeded - -" added.
..End Macro
Rule "dropInvalid " added.
..Expanding Macro /usr/share/shorewall/macro.SMB...
Rule "DROP - - udp 135,445 - -" added.
Rule "DROP - - udp 137:139 - -" added.
Rule "DROP - - udp 1024: 137 -" added.
Rule "DROP - - tcp 135,139,445 - -" added.
..End Macro
..Expanding Macro /usr/share/shorewall/macro.DropUPnP...
Rule "DROP - - udp 1900 - -" added.
..End Macro
Rule "dropNotSyn - - tcp " added.
..Expanding Macro /usr/share/shorewall/macro.DropDNSrep...
Rule "DROP - - udp - 53 -" added.
..End Macro
Processing /usr/share/shorewall/action.Reject for Chain Reject...
..Expanding Macro /usr/share/shorewall/macro.Auth...
Rule "REJECT - - tcp 113 - -" added.
..End Macro
Rule "dropBcast " added.
..Expanding Macro /usr/share/shorewall/macro.AllowICMPs...
Rule "ACCEPT - - icmp fragmentation-needed - -" added.
Rule "ACCEPT - - icmp time-exceeded - -" added.
..End Macro
Rule "dropInvalid " added.
..Expanding Macro /usr/share/shorewall/macro.SMB...
Rule "REJECT - - udp 135,445 - -" added.
Rule "REJECT - - udp 137:139 - -" added.
Rule "REJECT - - udp 1024: 137 -" added.
Rule "REJECT - - tcp 135,139,445 - -" added.
..End Macro
..Expanding Macro /usr/share/shorewall/macro.DropUPnP...
Rule "DROP - - udp 1900 - -" added.
..End Macro
Rule "dropNotSyn - - tcp " added.
..Expanding Macro /usr/share/shorewall/macro.DropDNSrep...
Rule "DROP - - udp - 53 -" added.
..End Macro
Processing /etc/shorewall/policy...
Policy ACCEPT for fw to net using chain fw2net
Policy DROP for net to fw using chain net2all
Setting up Traffic Control Rules...
Validating /etc/shorewall/tcdevices...
Validating /etc/shorewall/tcclasses...
Activating Rules...
Shorewall Started
Par rapport à Patgrisly, j'ai :
Determining Zones...
IPv4 Zones: net
Firewall Zone: fw
au lieu de :
IPv4 Zones: Code net
Et
Determining Hosts in Zones...
net Zone: ppp0:0.0.0.0/0
au lieu de
net Zone: eth0:0.0.0.0/0
Pas de warning chez moi.
Les tests de sécurité en ligne sont maintenant passés avec succès ! Chouette ! 😛
Le plus rigolo dans cette histoire, c'est qu'un copain vient de me filer un routeur ADSL. Je devrais donc changer de type de connexion ! 😃