Je suis confronté à un soucis. J'ai un serveur samba local que je ne vois pas quand mes regles iptables sont actives, mais j'ai quand même l'accès.
Seulement, je fouiné et il semble que mes regles soient bonnes.
Mes iptables :
Code : Tout sélectionner
### BEGIN INIT INFO
# Provides: iptables
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: iptables rules
### END INIT INFO
#!/bin/bash
IPTS=iptables
#Efface les règles précédentes
$IPTS -t filter -F
$IPTS -t filter -X
#Bloque par défaut tout le trafic
$IPTS -t filter -P INPUT DROP
$IPTS -t filter -P FORWARD DROP
$IPTS -t filter -P OUTPUT DROP
#Exclu la fermeture des connexions déjà établies
$IPTS -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTS -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
#LOOPBACK
$IPTS -t filter -A INPUT -i lo -j ACCEPT
$IPTS -t filter -A OUTPUT -o lo -j ACCEPT
#DNS
$IPTS -t filter -A OUTPUT -p udp --dport 53 -j ACCEPT
$IPTS -t filter -A OUTPUT -p tcp --dport 53 -j ACCEPT
$IPTS -t filter -A INPUT -p tcp --dport 53 -j ACCEPT
$IPTS -t filter -A INPUT -p udp --dport 53 -j ACCEPT
#NTP
$IPTS -t filter -A OUTPUT -p udp --dport 123 -j ACCEPT
#PING
$IPTS -t filter -A INPUT -p icmp -j ACCEPT
$IPTS -t filter -A OUTPUT -p icmp -j ACCEPT
#SSH
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 28 -j ACCEPT
#WAKE-ON-LAN
$IPTS -t filter -A INPUT -p udp --dport 9 -j ACCEPT
#HTTP
$IPTS -t filter -A INPUT -p tcp --dport 80 -j ACCEPT
$IPTS -t filter -A OUTPUT -p tcp --dport 80 -j ACCEPT
#HTTPS
$IPTS -t filter -A INPUT -p tcp --dport 443 -j ACCEPT
$IPTS -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT
#SAMBA
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 135 -j ACCEPT
$IPTS -t filter -A OUTPUT -p tcp --dport 135 -j ACCEPT
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 137 -j ACCEPT
$IPTS -t filter -A OUTPUT -p tcp --dport 137 -j ACCEPT
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 139 -j ACCEPT
$IPTS -t filter -A OUTPUT -p tcp --dport 139 -j ACCEPT
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 445 -j ACCEPT
$IPTS -t filter -A OUTPUT -p tcp --dport 445 -j ACCEPT
$IPTS -t filter -A INPUT -p udp -s 192.168.1.0/24 --dport 135 -j ACCEPT
$IPTS -t filter -A OUTPUT -p udp --dport 135 -j ACCEPT
$IPTS -t filter -A INPUT -p udp -s 192.168.1.0/24 --dport 137 -j ACCEPT
$IPTS -t filter -A OUTPUT -p udp --dport 137 -j ACCEPT
$IPTS -t filter -A INPUT -p udp -s 192.168.1.0/24 --dport 138 -j ACCEPT
$IPTS -t filter -A OUTPUT -p udp --dport 138 -j ACCEPT
$IPTS -t filter -A INPUT -p udp -s 192.168.1.0/24 --dport 445 -j ACCEPT
$IPTS -t filter -A OUTPUT -p udp --dport 445 -j ACCEPT
#SEAFILE
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 10001 -j ACCEPT
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 12001 -j ACCEPT
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 8082 -j ACCEPT
$IPTS -t filter -A INPUT -p tcp -s 192.168.1.0/24 --dport 8000 -j ACCEPT
#MYSQL
$IPTS -A INPUT -p tcp -s 192.168.1.0/24 --dport 3306 -j ACCEPT
Une solution, svp ?