View previous topic :: View next topic |
Author |
Message |
Biacho n00b
Joined: 01 Sep 2005 Posts: 25 Location: Poland / Opole
|
Posted: Wed Apr 29, 2009 5:43 pm Post subject: Problem podczas startowania shorewall. |
|
|
Witam. Stawiam sobie router mój własny prywatny. Do skonfigurowania iptables został mi polecony Shorewall. Skonfigurowałem go sugerując się opisami co i jak zrobić, znalezionymi w sieci (tutaj i tutaj). Niestety przy starcie wyrzuca mi błąd :
Code: | Zion biacho # /etc/init.d/shorewall start
* Starting firewall ...
iptables: No chain/target/match by that name
ERROR: Command "/sbin/iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT" Failed
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
/sbin/shorewall: line 375: 31510 Zakończony ${VARDIR}/.start $debugging start [ !! ]
Zion biacho #
|
'iptables -L' zwraca mi to :
Code: | Zion biacho # iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
|
Wystartowałem przez 'shorewall safe-start' i to z kolei wyrzuciło to :
Code: | Zion biacho # shorewall safe-start
Compiling...
Initializing...
Determining Zones...
IPv4 Zones: net loc
Firewall Zone: fw
Validating interfaces file...
Validating hosts file...
Pre-processing Actions...
Pre-processing /usr/share/shorewall/action.Drop...
Pre-processing /usr/share/shorewall/action.Reject...
Validating Policy file...
Determining Hosts in Zones...
net Zone: eth1:0.0.0.0/0
loc Zone: wlan0:192.168.5.0/24
Deleting user chains...
Compiling /etc/shorewall/routestopped ...
Creating Interface Chains...
Compiling Common Rules
Adding Anti-smurf Rules
Adding rules for DHCP
Compiling TCP Flags checking...
Compiling Kernel Route Filtering...
Compiling Martian Logging...
Compiling IP Forwarding...
Compiling /etc/shorewall/rules...
Compiling Actions...
Compiling /usr/share/shorewall/action.Drop for Chain Drop...
Compiling /usr/share/shorewall/action.Reject for Chain Reject...
Compiling /etc/shorewall/policy...
Compiling Traffic Control Rules...
Compiling Rule Activation...
Shorewall configuration compiled to /var/lib/shorewall/.start
Starting...
Processing /etc/shorewall/params ...
Starting Shorewall....
Initializing...
Processing /etc/shorewall/init ...
Clearing Traffic Control/QOS
Deleting user chains...
iptables: No chain/target/match by that name
ERROR: Command "/sbin/iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT" Failed
Processing /etc/shorewall/stop ...
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
IP Forwarding Enabled
Processing /etc/shorewall/stopped ...
Shorewall Cleared
/sbin/shorewall: line 813: 26351 Zakończony ${VARDIR}/.$command $command
|
Plik '/var/lib/shorewall/.start' zawiera to : (plik jest długi dlatego wrzuciłem go w wklej.org)
http://wklej.org/hash/ab6c653ce2/
Próbowałem usunąć[/code] łańcuch ręcznie po przez 'iptables -D' ale też nie podziałało:
Code: | Zion biacho # iptables -D FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables: Bad rule (does a matching rule exist in that chain?)
|
Walczę z tym już tydzień, przeszukałem siec na tyle na ile pozwala moja wiedza. W zakresie iptables ipt. jest ona raczej nie wielka to też możliwe, że źle zadawałem pytania w google. Na tutejszym forum też nic nie znalazłem lub pominąłem nie wiedząc, ze może to być mi pomocne. _________________ Always Gentoo !
Last edited by Biacho on Wed Apr 29, 2009 5:47 pm; edited 1 time in total |
|
Back to top |
|
|
SlashBeast Retired Dev
Joined: 23 May 2006 Posts: 2922
|
Posted: Wed Apr 29, 2009 5:46 pm Post subject: |
|
|
Przepuszczam, ze brak Ci w kernelu kilku zabawek 'match' z netfilera. dokladniej CONFIG_NETFILTER_XT_MATCH_STAT ("state" match support). |
|
Back to top |
|
|
Biacho n00b
Joined: 01 Sep 2005 Posts: 25 Location: Poland / Opole
|
Posted: Wed Apr 29, 2009 5:54 pm Post subject: |
|
|
SlashBeast wrote: | Przepuszczam, ze brak Ci w kernelu kilku zabawek 'match' z netfilera. |
W 'IP: Netfilter Configuration' mam wkompilowane w jądro wszystko.
Konfiguracja kernela : .config
Update!
A więc tak... Wkompilowałem w jądro tak jak radziłeś SlashBeast. Pomogło na błąd z iptables. Niestety shorewall dalej nie startuje:
Code: | Zion biacho # shorewall safe-start
Compiling...
Initializing...
Determining Zones...
IPv4 Zones: net loc
Firewall Zone: fw
Validating interfaces file...
Validating hosts file...
Pre-processing Actions...
Pre-processing /usr/share/shorewall/action.Drop...
Pre-processing /usr/share/shorewall/action.Reject...
Validating Policy file...
Determining Hosts in Zones...
net Zone: eth1:0.0.0.0/0
loc Zone: wlan0:192.168.5.0/24
Deleting user chains...
Compiling /etc/shorewall/routestopped ...
Creating Interface Chains...
Compiling Common Rules
Adding Anti-smurf Rules
Adding rules for DHCP
Compiling TCP Flags checking...
Compiling Kernel Route Filtering...
Compiling Martian Logging...
Compiling IP Forwarding...
Compiling /etc/shorewall/rules...
Compiling Actions...
Compiling /usr/share/shorewall/action.Drop for Chain Drop...
Compiling /usr/share/shorewall/action.Reject for Chain Reject...
Compiling /etc/shorewall/policy...
Compiling Traffic Control Rules...
Compiling Rule Activation...
Shorewall configuration compiled to /var/lib/shorewall/.start
Starting...
Processing /etc/shorewall/params ...
Starting Shorewall....
Initializing...
Processing /etc/shorewall/init ...
Clearing Traffic Control/QOS
Deleting user chains...
Processing /etc/shorewall/continue ...
Enabling Loopback and DNS Lookups
iptables: No chain/target/match by that name
Processing /etc/shorewall/stop ...
IP Forwarding Enabled
Processing /etc/shorewall/stopped ...
Shorewall Cleared
/sbin/shorewall: line 813: 12387 Zakończony ${VARDIR}/.$command $command
|
Czy to może być wina już samej konfiguracji shorewall'a czy coś w systemie jeszcze siedzi ? _________________ Always Gentoo ! |
|
Back to top |
|
|
ryba84 Tux's lil' helper
Joined: 31 Dec 2008 Posts: 109
|
Posted: Wed Apr 29, 2009 6:29 pm Post subject: |
|
|
Może spróbuj samemu napisać regułki iptables (wtedy będzie dokładnie wiadomo czego Ci brakuje w konfigu kernela ). Nie jest to trudne. Tutaj stronka z opisem jak stworzyć małą sieć domową w oparciu o iptables. A tutaj opisane jak stworzyć regułki firewalla. Wszystko polecałbym wrzucić do skryptu init, tutaj opisane jak wygląda taki skrypt w gentoo.
Ps. tak wyglądają moje opcje w kernelu dotyczące netfilter Code: | CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
CONFIG_NETFILTER_XT_TARGET_RATEEST=m
# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
CONFIG_NETFILTER_XT_TARGET_SECMARK=m
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
CONFIG_NETFILTER_XT_MATCH_DCCP=m
CONFIG_NETFILTER_XT_MATCH_DSCP=m
CONFIG_NETFILTER_XT_MATCH_ESP=m
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_OWNER=m
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
CONFIG_NETFILTER_XT_MATCH_REALM=m
CONFIG_NETFILTER_XT_MATCH_RECENT=m
CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT=y
CONFIG_NETFILTER_XT_MATCH_SCTP=m
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_TIME=m
CONFIG_NETFILTER_XT_MATCH_U32=m |
|
|
Back to top |
|
|
Biacho n00b
Joined: 01 Sep 2005 Posts: 25 Location: Poland / Opole
|
Posted: Wed Apr 29, 2009 7:11 pm Post subject: |
|
|
Jak stworzyłem sobie podstawowego firewall'a za pomocą skryptu i suchych komend iptables to ładnie wszystko działa. Net na kompach w sieci jest, DHCP ładnie działa wszystko ładnie i w ogóle. Czyli chyba raczej sama konfiguracja shorewall'a jest nie do końca prawidłowa skoro on się nie chce odpalić. I w tym kierunku dalej będę szukał.
Mimo wszystko jak by ktoś miał pomysł co może być nie tak, będę wdzięczny za pomoc. _________________ Always Gentoo ! |
|
Back to top |
|
|
|