Portál AbcLinuxu, 10. května 2025 08:44
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...
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.
-x
a uvidíte přímo, který příkaz způsobí kterou chybu.
#!/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.
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
-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.
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.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.