Thread View: pl.comp.sys.sun.admin
2 messages
2 total messages
Started by Koro
Sat, 13 Oct 2007 11:41
ipfilter problem solaris10
Author: Koro
Date: Sat, 13 Oct 2007 11:41
Date: Sat, 13 Oct 2007 11:41
33 lines
1834 bytes
1834 bytes
Mam dziwny problem z ipfilter. Nie ładuje mi sterownika karty sieciowej podczas startu z pliczku /etc/ipf/pfil.ap. Karta to bge0. Usługi wstają przy starcie ale firewall nie filtruje svcs -a | grep pfil online 13:11:14 svc:/network/pfil:default online 13:11:20 svc:/network/ipfilter:default online 13:11:20 svc:/system/rmtmpfiles:default ipfstat | grep packets bad packets: in 0 out 0 IPv6 packets: in 0 out 0 input packets: blocked 0 passed 0 nomatch 0 counted 0 short 0 output packets: blocked 0 passed 0 nomatch 0 counted 0 short 0 input packets logged: blocked 0 passed 0 output packets logged: blocked 0 passed 0 packets logged: input 0 output 0 ifconfig bge0 modlist 0 arp 1 ip 2 bge W związku z tym spróbowałem ręcznie załadować ifconfig bge0 modinsert pfil@2 autopush -f /etc/ipf/pfil.ap ifconfig bge0 unplumb ifconfig bge0 plumb Jak ręcznie zrobię to wszystko chodzi jak należy, ale po ponownym restarcie znowu to samo. Może ktoś z was wie w jaki sposób zrobić, żeby ładowało w trakcie startu ??
Re: ipfilter problem solaris10
Author: Koro
Date: Mon, 15 Oct 2007 07:51
Date: Mon, 15 Oct 2007 07:51
110 lines
3990 bytes
3990 bytes
Koro pisze:
> Mam dziwny problem z ipfilter. Nie ładuje mi sterownika karty sieciowej
> podczas startu z pliczku /etc/ipf/pfil.ap. Karta to bge0.
> Usługi wstają przy starcie ale firewall nie filtruje
> svcs -a | grep pfil
> online 13:11:14 svc:/network/pfil:default
> online 13:11:20 svc:/network/ipfilter:default
> online 13:11:20 svc:/system/rmtmpfiles:default
>
> ipfstat | grep packets
> bad packets: in 0 out 0
> IPv6 packets: in 0 out 0
> input packets: blocked 0 passed 0 nomatch 0 counted 0 short 0
> output packets: blocked 0 passed 0 nomatch 0 counted 0 short 0
> input packets logged: blocked 0 passed 0
> output packets logged: blocked 0 passed 0
> packets logged: input 0 output 0
>
> ifconfig bge0 modlist
> 0 arp
> 1 ip
> 2 bge
>
>
> W związku z tym spróbowałem ręcznie załadować
>
> ifconfig bge0 modinsert pfil@2
> autopush -f /etc/ipf/pfil.ap
> ifconfig bge0 unplumb
> ifconfig bge0 plumb
>
> Jak ręcznie zrobię to wszystko chodzi jak należy, ale po ponownym
> restarcie znowu to samo. Może ktoś z was wie w jaki sposób zrobić, żeby
> ładowało w trakcie startu ??
>
>
>
Znalazłem rozwiązanie. Moja maszyna jest regularnie patchowana, i
któregoś razy wywaliło mi skrypt odpowiedzialny za ładowanie modułów w
/lib/svc/method/pfil
cat /lib/svc/method/pfil
cat pfil
#!/sbin/sh
#
# ident "@(#)pfil 1.5 07/05/15 SMI"
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
exit 0
A więc widzimy że jedyne co pozostało w tym pliku to Copyright:)
Zastąpiłem skrypt z niezpatchowanej maszyny i wszystko chodzi jak
należy. Powinien on byc takiej treści.
# /lib/svc/method/pfil
#!/sbin/sh
#
# ident "@(#)pfil 1.2 04/11/24 SMI"
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# Autopush pfil on to filtering interfaces and restrict
# network traffic during startup
#
PFILAP=/etc/ipf/pfil.ap
case "$1" in
'start')
/sbin/autopush -f ${PFILAP}
enabled=`svcprop -p general/enabled svc:/network/ipfilter:default`
# To avoid a window of vulnerability during the time that
networking
# is being initialized but before the full ipf.conf
configuration is
# loaded, install a temporary, restrictive rule set now, early in
# boot. This gets replaced by the contents of ipf.conf when the
# svc:/network/ipfilter service is started. Note that if /usr
is not
# mounted, the window of vulnerability still exists because we
can't
# run the ipf command this early.
if [ -x /usr/sbin/ipf ] && [ "$enabled" = "true" ]; then
echo "block in all" | /usr/sbin/ipf -Fa -f -
echo "block out all" | /usr/sbin/ipf -f -
echo "pass out from any to any port = 53 keep state" \
| /usr/sbin/ipf -f -
fi
;;
*)
echo "Usage: $0 start"
exit 1
;;
esac
exit 0
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads