Vanya 0 Posted 2008-02-16 20:14:08 Share Posted 2008-02-16 20:14:08 Народ помогите!!! Старгейзер не отключает должников, хотя я их отключил, а они все равно лезут в инет, как проверить работают ли скрипты онконнект и дисконект Link to post Share on other sites
Vanya 0 Posted 2008-02-16 20:17:52 Author Share Posted 2008-02-16 20:17:52 Еще забыл - Фря 6.2 стг 2.401.9.7 Link to post Share on other sites
madf 279 Posted 2008-02-16 21:39:18 Share Posted 2008-02-16 21:39:18 Делай логирование их работы Вставь туда чтото вроде echo "OnConnect" >> /var/log/stagrazer-script.log И на OnDisconnect - соответственно Link to post Share on other sites
xzvf 0 Posted 2008-02-16 21:40:13 Share Posted 2008-02-16 21:40:13 Народ помогите!!!Старгейзер не отключает должников, хотя я их отключил, а они все равно лезут в инет, как проверить работают ли скрипты онконнект и дисконект chmod 755 /etc/stargazer/* Link to post Share on other sites
Vanya 0 Posted 2008-02-17 21:05:44 Author Share Posted 2008-02-17 21:05:44 не работает ничего Link to post Share on other sites
Колян 2 Posted 2008-02-17 22:15:09 Share Posted 2008-02-17 22:15:09 Перезапустить стг попробуй, бывает... Link to post Share on other sites
XoRe 0 Posted 2008-02-18 00:56:09 Share Posted 2008-02-18 00:56:09 2Vanya: OnConnect, OnDisconnect в студию. Link to post Share on other sites
Vanya 0 Posted 2008-03-09 11:46:38 Author Share Posted 2008-03-09 11:46:38 Похоже дело не в скриптах Скрипты работают, если ставлю левый айпи то захожу в инет без проблем Скрипты онконнект: #!/bin/bash # Login LOGIN=$1 #user IP IP=$2 #cash CASH=$3 #user ID ID=$4 SPEED1="0" TRF=`/usr/bin/grep ^Tariff= /var/stargazer/users/$LOGIN/conf | /usr/bin/cut -f 2 -d "="` if `/bin/echo $TRF | /usr/bin/grep -q SPEED` then SPD1=${TRF#*SPEED} SPEED1=${SPD1%_*} fi SPEED=`/bin/echo $SPEED1"bit/s"` /sbin/ipfw add $((20000+$ID*10)) pipe $((20000+$ID*10)) ip from any to $IP /sbin/ipfw add $((20000+$ID*10+1)) pipe $((20000+$ID*10+1)) ip from $IP to any /sbin/ipfw add $((20000+$ID*10+2)) divert natd ip from $IP to any /sbin/ipfw pipe $((20000+$ID*10)) config bw $SPEED /sbin/ipfw pipe $((20000+$ID*10+1)) config bw $SPEED echo "C `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log дисконнект: #!/bin/bash # Login LOGIN=$1 #user IP IP=$2 #cash CASH=$3 #user ID ID=$4 /sbin/ipfw delete $((20000+$ID*10)) /sbin/ipfw delete $((20000+$ID*10+1)) /sbin/ipfw delete $((20000+$ID*10+2)) echo "D `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log Link to post Share on other sites
egor2fsys 5 Posted 2008-03-09 12:24:30 Share Posted 2008-03-09 12:24:30 Покажите скрипт начальной инициализации фаервола. Link to post Share on other sites
Vanya 0 Posted 2008-03-12 15:26:30 Author Share Posted 2008-03-12 15:26:30 в ipfw divert 8668 ip from 192.168.0.0/21 to any а наверное надо закрыть эти сети и поставить deny Link to post Share on other sites
Vanya 0 Posted 2008-03-12 15:28:08 Author Share Posted 2008-03-12 15:28:08 хотя фаервол не я писал Link to post Share on other sites
Vanya 0 Posted 2008-03-13 13:35:36 Author Share Posted 2008-03-13 13:35:36 Народ!!! Подскажите ПЛИЗЗЗ какое правило прописать в фаерволе чтоб закритьсеткедоступ и потом cкрипт работал, прописую: ipfw add 100 deny ip from 192.168.0.0/21 to any никто не может зайти Link to post Share on other sites
Vanya 0 Posted 2008-03-24 06:29:31 Author Share Posted 2008-03-24 06:29:31 Вопрос можно снять, уже все сам решил, доку надо читать (С) Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now