dimastepanov 0 Posted 2008-07-20 13:50:09 Share Posted 2008-07-20 13:50:09 на FreeBSD 6.3 при вызове юзером скрипта OnConnect, правила для IPFW в этом скрипте не влияют на фаер. Что делать? пример OnConnect: fwcmd="/sbin/ipfw -q" int_if1="vr0" # Login LOGIN=$1 #user IP IP=$2 #cash CASH=$3 #user ID ID=$4 ${fwcmd} add `expr $id '*' 10 + 5000` allow all from $ip to any via ${int_if1} echo "C `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log причем connect.log показывает инфу по коннекту и дисконнекту этого юзера. Link to post Share on other sites
dimastepanov 0 Posted 2008-07-22 05:17:35 Author Share Posted 2008-07-22 05:17:35 Народ! ПОМОГИТЕ, ПЛИЗ! Неужели никто не знает в чем дело? #!/bin/bash чтоли вставлять? P.S. Между делом установил за 15 минут squid и за 30 - lightsquid. Смотрю в сторону SAMS ... Link to post Share on other sites
muff 116 Posted 2008-07-22 05:55:05 Share Posted 2008-07-22 05:55:05 Дейстительно, если это скрипт, то первая строка должна быть типа "#!/bin/sh", в зависимости от того, в какой шелл хочеш перенаправить. Попробуй... Link to post Share on other sites
dimastepanov 0 Posted 2008-07-22 06:29:08 Author Share Posted 2008-07-22 06:29:08 неа, не получается - все также стоит правило в фаере: ipfw add 6000 deny all from 192.168.0.1 to any via vr0 OnConnect-ом к правилу, я так понял, должно добавиться: 5000 allow ip from 192.168.0.1 to any via vr0 а, не добавляется Link to post Share on other sites
muff 116 Posted 2008-07-22 06:51:39 Share Posted 2008-07-22 06:51:39 Мдя... Так сразу и не скажу тогда... Надо уже на серваке искать, что не так... Link to post Share on other sites
dimastepanov 0 Posted 2008-07-22 07:39:24 Author Share Posted 2008-07-22 07:39:24 может настроить какие-нить логи, чтоб отследить? Подскажите, плиз.. Link to post Share on other sites
muff 116 Posted 2008-07-22 07:41:30 Share Posted 2008-07-22 07:41:30 нужно копать... А логи - это однозначно. Смотри по максимуму все что можно. Если хочешь - могу посмотреть, если в аську бросишь реквизиты доступа к серверу. 277-87-22-17 Link to post Share on other sites
dimastepanov 0 Posted 2008-07-22 09:44:43 Author Share Posted 2008-07-22 09:44:43 Все ОК Muff помог скрипты имели синтаксические ошибки! Закрываю 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