bon cette fois je me suis mis en root
et j ai executer ce fichier :
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT DROP
iptables -P OUTUT ACCEPT
iptables -P FORWARD DROP
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -N SuiviConnexions
iptables -A SuiviConnexions -m state --state NEW -i eth0 -s 192.168.0.1 -j ACCEPT
iptables -A SuiviConnexions -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i eth0 -s 192.168.0.1 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -j SuiviConnexions
iptables -t nat -A POSTROUTING -s 192.168.0.1 -o ppp0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
et voici la reponse :
[root@gateway tmp]# ./firewall
iptables: No chain/target/match by that name
iptables: Table does not exist (do you need to insmod?)
iptables: No chain/target/match by that name
iptables: Table does not exist (do you need to insmod?)
iptables: No chain/target/match by that name
iptables: Table does not exist (do you need to insmod?)
iptables: Bad policy name
iptables: Bad built-in chain name
iptables: Bad policy name
iptables: Bad policy name
iptables: Bad policy name
iptables: Bad policy name
iptables: Bad policy name
iptables: Bad policy name
iptables: Chain already exists
'ptables v1.2.3: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `SuiviConnexions
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `MASQUERADE
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.2.3: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
: No such file or directorypv4/ip_forward
bon c qd meme fou tt ca, pk si je tape les commandes une par une y a aucun probleme !!
il me parle de prob de modules
mais la j ai mis toutes mes regles a la main et donc tous les bons modules sont deja charge !
je capte vraiment po pq il refuse de m executer ce t1 de fichier !!
grrrrrrrrrrr
[edtdd]--Message édité par djtoz--[/edtdd]