[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [???]IPTABLES -A INPUT -p all *********



Resalut,
> Bonjours
>
> voilà j'aurais aimer savoir si vous connaisseriez une commande qui
> permetterais
>  au lieu de taper:
> /*
> iptables -A INPUT -p tcp --dport ssh --sport ssh -j ACCEPT
> iptables -A INPUT -p udp --dport ssh --sport ssh -j ACCEPT
> */
>
> pour que `iptables -L` affiche:
> /*
> target     prot opt source               destination
> ACCEPT     "all"  --  anywhere             anywhere
> */
>
> all à la place de tcp et udp de façon à ouvrir le port avec tout les
> protocoles sur le port.
> 
> Il suffit de lire le manpage...
> 
>  -p, --protocol [!] protocol:
> 
> The  protocol  of  the rule or of the packet to check.  The
>               specified protocol can be one of tcp, udp, icmp, or all, or
>               it can be a numeric value, representing one of these proto­
>               cols or a different one.  A protocol name from  /etc/proto­
>               cols  is  also allowed.  A "!" argument before the protocol
>               inverts the test.  The number zero is  equivalent  to  all.
>               Protocol  all will match with all protocols and is taken as
>               default when this option is omitted.
> 
>  iptables -A INPUT -p all --dport ssh --sport ssh -j ACCEPT
> 
Merci, mais le porbleme c'est qu'il me fais une erreur :S au niveau de --dport il me dit:

iptables v1.2.9: Unknown arg `--dport'
Try `iptables -h' or 'iptables --help' for more information.

aussi, voici se que j'ai tapé:

iptables -A INPUT -i eth0 -p all --dport ssh --sport ssh -j ACCEPT

ps: t'as commandes me fait la meme erreur :S

je lit ça aussi dans le man:
   multiport
       This  module  matches  a  set of source or destination ports.  Up to 15
       ports can be specified.  It can only be used in conjunction with -p tcp
       or -p udp.

Y'aurais t'il vraiement pas moyen??



Reply to: