Alors iptables-save ne donne rien, cela me fait juste un retour à l’invite.
Sinon :
ls -l /etc/rc2.d
total 4
-rw-r–r-- 1 root root 677 27 mars 03:50 README
lrwxrwxrwx 1 root root 17 7 juil. 15:50 S14portmap -> …/init.d/portmap
lrwxrwxrwx 1 root root 20 7 juil. 15:50 S15nfs-common -> …/init.d/nfs-common
lrwxrwxrwx 1 root root 24 7 juil. 15:50 S17binfmt-support -> …/init.d/binfmt-support
lrwxrwxrwx 1 root root 20 7 juil. 15:51 S17fancontrol -> …/init.d/fancontrol
lrwxrwxrwx 1 root root 17 7 juil. 15:50 S17rsyslog -> …/init.d/rsyslog
lrwxrwxrwx 1 root root 14 7 juil. 15:50 S17sudo -> …/init.d/sudo
lrwxrwxrwx 1 root root 15 7 juil. 15:50 S18acpid -> …/init.d/acpid
lrwxrwxrwx 1 root root 17 7 juil. 15:50 S18anacron -> …/init.d/anacron
lrwxrwxrwx 1 root root 13 7 juil. 15:50 S18atd -> …/init.d/atd
lrwxrwxrwx 1 root root 14 7 juil. 15:50 S18cron -> …/init.d/cron
lrwxrwxrwx 1 root root 14 7 juil. 15:50 S18dbus -> …/init.d/dbus
lrwxrwxrwx 1 root root 15 7 juil. 15:50 S18exim4 -> …/init.d/exim4
lrwxrwxrwx 1 root root 20 7 juil. 15:51 S18kerneloops -> …/init.d/kerneloops
lrwxrwxrwx 1 root root 21 7 juil. 15:50 S18loadcpufreq -> …/init.d/loadcpufreq
lrwxrwxrwx 1 root root 22 7 juil. 15:50 S19avahi-daemon -> …/init.d/avahi-daemon
lrwxrwxrwx 1 root root 19 7 juil. 15:50 S19bluetooth -> …/init.d/bluetooth
lrwxrwxrwx 1 root root 22 7 juil. 15:50 S19cpufrequtils -> …/init.d/cpufrequtils
lrwxrwxrwx 1 root root 25 7 juil. 15:51 S19network-manager -> …/init.d/network-manager
lrwxrwxrwx 1 root root 14 7 juil. 15:50 S20cups -> …/init.d/cups
lrwxrwxrwx 1 root root 14 7 juil. 15:51 S20gdm3 -> …/init.d/gdm3
lrwxrwxrwx 1 root root 15 7 juil. 15:51 S20saned -> …/init.d/saned
lrwxrwxrwx 1 root root 18 7 juil. 15:51 S21bootlogs -> …/init.d/bootlogs
lrwxrwxrwx 1 root root 18 7 juil. 15:51 S22rc.local -> …/init.d/rc.local
lrwxrwxrwx 1 root root 19 7 juil. 15:51 S22rmnologin -> …/init.d/rmnologin
lrwxrwxrwx 1 root root 23 7 juil. 15:51 S22stop-bootlogd -> …/init.d/stop-bootlogd
Dans le cas de gufw, c’est à installer via synaptic c’est cela? avec ufw (que j’ai pas)? Il faudra que je supprime le fichier “parefeu” actuel de init.d? Rien d’autre à effacer?
Scipt en l’état acutel des choses :
#!/bin/sh
BEGIN INIT INFO
Provides: parefeu
Required-Start: $local_fs
Should-Start:
Required-Stop: $local_fs
Should-Stop:
X-Start-Before: $network
X-Stop-After: $network
Default-Start: S
Default-Stop: 0 6
Short-description: Firewall rules
Description: Configure NetFilter firewall with iptables
END INIT INFO
chargement/déchargement d’iptables
case “$1” in
’start’)
/sbin/iptables-restore < /etc/config_parefeu
RETVAL=$?
;;
‘stop’)
/sbin/iptables-save > /etc/config_parefeu
RETVAL=$?
;;
‘clean’)
clean le parefeu pendant que la machine tourne
ça peut être une faille de sécurite si on l’exécute lors de l’extinction avant l’arrêt des interfaces
pensez à refaire un start après sinon la sauvegarde se fera automatiquement à l’extinction
/sbin/iptables -t filter -F
/sbin/iptables -t nat -F
/sbin/iptables -t mangle -F
/sbin/iptables -t raw -F
/sbin/iptables -t filter -P INPUT ACCEPT
/sbin/iptables -t filter -P OUTPUT ACCEPT
/sbin/iptables -t filter -P FORWARD ACCEPT
/sbin/iptables -t nat -P PREROUTING ACCEPT
/sbin/iptables -t nat -P POSTROUTING ACCEPT
/sbin/iptables -t nat -P OUTPUT ACCEPT
/sbin/iptables -t mangle -P PREROUTING ACCEPT
/sbin/iptables -t mangle -P OUTPUT ACCEPT
/sbin/iptables -t mangle -P POSTROUTING ACCEPT
/sbin/iptables -t mangle -P FORWARD ACCEPT
/sbin/iptables -t mangle -P INPUT ACCEPT
/sbin/iptables -t raw -P OUTPUT ACCEPT
/sbin/iptables -t raw -P PREROUTING ACCEPT
RETVAL=$?
;;
‘restart’)
$0 stop && $0 start
RETVAL=$?
;;
*)
echo "Usage: $0 { start | stop | restart | clean}"
RETVAL=1
;;
esac
exit $RETVAL