Walnąłem tą linijkę
ipfwadm -I $par reject -P udp -S $1 - D any/0 1214, ale i tak się kaza łączy. Aha z serwerem łączę się przez putty'ego
Cytuj:
oraz sprawdził, czy pojawiają sie odpowiednie wpisy w tablicy blokowania po wydaniu komendy us_block z palca, wydając polecenie
nie bardzo wiem jak. Kiedy wpisuje do linii poleceń
us_blok wyświetla komunikat
ipfwadm: setsockopt failed: Invalid argument
Przy okazji zamieszcze dwa pliki. Może się przyda wam przy rozwiązaniu problemu, bo ja nie jestem dobry w sprawach linuxa
Plik atd
#!/bin/sh
while :; do
sleep 60 2>/dev/null; C='/bin/date +%H%M'
if [ $C = 1400 ]; then
us_blok on
fi
if [ $C = 2100 ]; then
us_blok off
fi
done
Plik rc_user
#!/bin/sh
#
# User startup/shutdown and firewall script.
. /etc/system.cfg
. /etc/live.cfg
. /etc/chat.pwd
if [ "$1" = firewall ]; then
# Add your custom firewall rules here. Warning, incorrect rules could
# leave your system insecure. $INET always represents the internet
# interface. These rules come before standard system rules. Example:
# reject incomming tcp connections to port 22 from the internet and log
#ipfwadm -I -a reject -P tcp -W $INET -D 0.0.0.0/0 22 -y -o
ipfwadm -I -i accept -P tcp -S 0/0 -r 80
ipfwadm -I -i accept -W eth0 -S 10.1.1.86
ipfwadm -I -i accept -W eth0 -S 10.1.1.90
ipfwadm -I -i accept -W eth0 -S 10.1.1.96
ipfwadm -I -i accept -W eth0 -S 10.1.1.97
ipfwadm -I -i accept -W eth0 -S 10.1.1.121
C='/bin/date +&H%M'
if [ $C -ge 1400 -a 2100 -ge $C ]; then
us_blok on
fi
#---------------------------------------------------------------------
exit; fi
if [ "$1" = stop -o "$1" = restart ]; then
echo -n "Stopping rc_user...III"
# Add commands here you want to execute when shutting down or rebooting.
# Be careful not to use any commands which wait for user input.
#----------------------------------------------------------------------
$DONE; [ "$1" = stop ] && exit; fi
echo -n "Starting rc_user...III"
# Add commands here you want to execute when booting. Use the fork
# command to launch programs which normally stay in the foreground.
fork /mnt/router/etc/atd
#----------------------------------------------------------------------
$DONE