Portál AbcLinuxu, 26. dubna 2024 23:45


Dotaz: IPTABLES hlasí errory :(

11.3.2006 19:43 sir Turbis | skóre: 19 | Varnsdorf
IPTABLES hlasí errory :(
Přečteno: 160×
Odpovědět | Admin
Dobrý den, právě jsem zapnul firewall. Funguje,ale po startu to hlasi tyto chyby:
Nahravam nastaveni.iptables v1.2.11: -P requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: -P requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: -P requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
..Bad argument `ACCEPT'
Try `iptables -h' or 'iptables --help' for more information.
.iptables v1.2.11: unknown protocol `tcp--sport' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: unknown protocol `tcp--dport' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: unknown protocol `tcp--sport' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: unknown protocol `tcp--dport' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: unknown protocol `tcp--dport' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: unknown protocol `tcp--sport' specified
Try `iptables -h' or 'iptables --help' for more information.
./usr/local/bin/firewall: line 159: IPTABLES: command not found
iptables v1.2.11: no command specified
Try `iptables -h' or 'iptables --help' for more information.
.done.
Zdrojový kod k firewallu naleznete zde

Za pomoc předem děkuji...
Don't hurry up, death is faster!
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

11.3.2006 19:45 Michal Kubeček | skóre: 72 | Luštěnice
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Odpovědět | | Sbalit | Link | Blokovat | Admin
Vypadá to, že jste na spoustě míst z nějakých záhadných míst vynechal mezery (a občas i jiné znaky). Doplňte je a chybové hlášky zmizí.
11.3.2006 21:35 sir Turbis | skóre: 19 | Varnsdorf
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Tak, několik chybek jsem opravil,ale stale to neco hlasi a ja nevim co..:(
Nahravam nastaveni.iptables v1.2.11: -P requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: -P requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: -P requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
..Bad argument `ACCEPT'
Try `iptables -h' or 'iptables --help' for more information.
..iptables v1.2.11: host/network `eth0' not found
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.11: no command specified
Try `iptables -h' or 'iptables --help' for more information.
.done.
Don't hurry up, death is faster!
11.3.2006 21:43 Petr Jelínek | skóre: 17 | blog: Vyprovokovanej | Praha
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Ten link nejde:

Not Found

The requested URL /firewall2 was not found on this server.
Nemám rád NVidii!
11.3.2006 21:50 martin
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
asi uz nasel chyby a stahl to.. :)
11.3.2006 22:02 sir Turbis | skóre: 19 | Varnsdorf
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
ten script tam je pořád, jen byl chvili přejmenovany....za to se omlouvam..ale chyby tam jsou pořád...
Don't hurry up, death is faster!
11.3.2006 22:00 Michal Kubeček | skóre: 72 | Luštěnice
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Přidejte si do specifikace interpreteru přepínač -x a uvidíte přímo, který příkaz způsobí kterou chybu.
11.3.2006 22:05 sir Turbis | skóre: 19 | Varnsdorf
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Mohl by jste trochu přesněji,vůbec jsem Vaši radu nepochopil.... co mám pustit s přepínačem -x? zkusil jsem přímo ten script, pak iptables..ale to asi nebude to pravé...
Don't hurry up, death is faster!
11.3.2006 22:46 martin
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
$IPTABLES -P INPUTDROP $IPTABLES -P OUTPUTACCEPT $IPTABLES -P FORWARDDROP

chybi ti mezery, napr INPUT DROP

a nekde dole je PREROUTING -s $LAN_IFACE - tak to napsat nemuzes, -s ma byt IP, takze treba -s 192.168.0.0/24
11.3.2006 22:51 Petr Jelínek | skóre: 17 | blog: Vyprovokovanej | Praha
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Tím bylo myšleno, že řádek

#!/bin/bash

máte opravit na

#!/bin/bash -x

Jinak v sekci "Zaklad" chybí mezery:

místo INPUTDROP má být INPUT DROP, místo OUTPUTACCEPT má být OUTPUT ACCEPT a místo FORWARDDROP má být FORWARD DROP. To zatím pro začátek.
Nemám rád NVidii!
11.3.2006 23:03 sir Turbis | skóre: 19 | Varnsdorf
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Děkuji za rady...vše jsem opravil, až asi na jednu chybu..no posudte sami....
Nahravam nastaveni...Bad argument `ACCEPT'
Try `iptables -h' or 'iptables --help' for more information.
..iptables v1.2.11: no command specified
Try `iptables -h' or 'iptables --help' for more information.
.done.
server:~# mc
Don't hurry up, death is faster!
11.3.2006 23:05 sir Turbis | skóre: 19 | Varnsdorf
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
po vypisu s argumentem -x mi to vyhodilo toto:
-j DNAT --to-destination 82.99.160.98
+ /sbin/iptables
iptables v1.2.11: no command specified
Try `iptables -h' or 'iptables --help' for more information.
+ /sbin/iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
+ /sbin/iptables -A FORWARD -i eth0 -p all -m state --state NEW -j ACCEPT
+ echo -n .
.+ echo done.
done.
Don't hurry up, death is faster!
11.3.2006 23:14 Michal Kubeček | skóre: 72 | Luštěnice
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Vždyť to tam máte jasně napsané: spustil jste příkaz iptables, aniž byste zadal jakýkoli příkaz. Doporučuji místo opisování příkladů z webu nejdřív na www.netfilter.org nastudovat něco o tom, jak vlastně netfilter funguje.
11.3.2006 23:19 sir Turbis | skóre: 19 | Varnsdorf
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Tenhle firewall jsem si psal sám pomocí článků z roota...děkuji za pomc všem..byla to opravdu blbost..jenže byla pěkně skryta..všem lidem děkuji za pomoc i trpělivost....
Don't hurry up, death is faster!
11.3.2006 23:21 Petr Jelínek | skóre: 17 | blog: Vyprovokovanej | Praha
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Smažte řádek, kde je jenom $IPTABLES nad sekcí "## povoleni provozu" a bude to...
Nemám rád NVidii!
11.3.2006 23:28 sir Turbis | skóre: 19 | Varnsdorf
Rozbalit Rozbalit vše Re: IPTABLES hlasí errory :(
Už se tak stalo...;)

Script nechám na stránkách ke stažení...možná se někomu bude hodit...
Don't hurry up, death is faster!

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.