yKpon Posted August 8, 2008 Posted August 8, 2008 Всем доброго времени суток! В общем есть сервер+stargazer, через него работают юзеры, выходят в городскую локальную сеть, а так же в интернет, сервер работает в режиме NAT, юзеры (192.168.0.0/24) авторизуются стандартно через inetaccess. Всё работает замечательно. Но! Появилась необходимость поднять в служебных целях vpn-сервер (pptpd) Некоторые параметры: - в сторону юзеров смотрит интерфейс eth2 (ип 192.168.0.1) и с него снимается/считается траффик старгайзером - параметры pptpd: localip 192.168.0.200, remoteip 192.168.0.201 Настраиваю служебный vpn (со стороны городской сети), проходит авторизация, попадаю в локальную подсетку 192.168.0.0/24, inetaccess авторизуется, интернет включается/работает, но не считает траффик! в конфигураторе у vpn-юзера пробовал прописывать "Интерфейс" и eth2, и ppp0, не помогает... В чём может быть проблема?... Буду благодарен за Вашу помощь
madf Posted August 8, 2008 Posted August 8, 2008 На ppp-интерфейсах может считать только cap_ipq. Не уверен что он есть в этой версии старгейзера
yKpon Posted August 8, 2008 Author Posted August 8, 2008 На ppp-интерфейсах может считать только cap_ipq. Не уверен что он есть в этой версии старгейзера может быть есть какой нестандартный выход из ситуации?
yKpon Posted August 8, 2008 Author Posted August 8, 2008 если я правильно понимаю, то нужно собрать из исходников немного иначе http://stg.dp.ua/doc20/conf_libipq.html в файле make.linux заменил строки: # PF_PACKET capture defines=-Dlinux -DTARIFF$(t) #ilbipq capture #defines=-Dlinux -DTARIFF$(t) -DCAPIPQ на # PF_PACKET capture #defines=-Dlinux -DTARIFF$(t) #ilbipq capture defines=-Dlinux -DTARIFF$(t) -DCAPIPQ но возникает проблема [root@boss stg2-2005.05.17-16.57.25]# make clean rm *.o rm: невозможно удалить `*.o': Нет такого файла или каталога make: *** [clean] Ошибка 1 [root@boss stg2-2005.05.17-16.57.25]# make cat inst_linux > .install chmod +x .install make -f make.linux make[1]: Entering directory `/home/stg/stg2-2005.05.17-16.57.25' g++ -c -Wall -g3 -Dlinux -DTARIFF2 -DCAPIPQ -o main.o main.cpp In file included from main.cpp:58: configproto.h:48:19: error: expat.h: Нет такого файла или каталога parser.h:69: warning: 'class PARSER' has virtual functions but non-virtual destructor parser.h:83: warning: 'class PARSERGETSERVERINFO' has virtual functions but non-virtual destructor parser.h:91: warning: 'class PARSERGETUSER' has virtual functions but non-virtual destructor parser.h:102: warning: 'class PARSERGETUSERS' has virtual functions but non-virtual destructor parser.h:111: warning: 'class PARSERGETTARIFFS' has virtual functions but non-virtual destructor parser.h:120: warning: 'class PARSERDELTARIFF' has virtual functions but non-virtual destructor parser.h:131: warning: 'class PARSERADDTARIFF' has virtual functions but non-virtual destructor parser.h:142: warning: 'class PARSERCHGTARIFF' has virtual functions but non-virtual destructor parser.h:159: warning: 'class PARSERADDUSER' has virtual functions but non-virtual destructor parser.h:172: warning: 'class PARSERCHGUSER' has virtual functions but non-virtual destructor parser.h:201: warning: 'class PARSERSENDMESSAGE' has virtual functions but non-virtual destructor parser.h:221: warning: 'class PARSERDELUSER' has virtual functions but non-virtual destructor parser.h:233: warning: 'class PARSERGETADMINS' has virtual functions but non-virtual destructor parser.h:243: warning: 'class PARSERDELADMIN' has virtual functions but non-virtual destructor parser.h:260: warning: 'class PARSERADDADMIN' has virtual functions but non-virtual destructor parser.h:270: warning: 'class PARSERCHGADMIN' has virtual functions but non-virtual destructor parser.h:285: warning: 'class PARSERCHECKUSER' has virtual functions but non-virtual destructor configproto.h:118: error: 'XML_Parser' does not name a type make[1]: *** [main.o] Ошибка 1 make[1]: Leaving directory `/home/stg/stg2-2005.05.17-16.57.25' make: *** [lin] Ошибка 2 система asp11
madf Posted August 8, 2008 Posted August 8, 2008 Во корень всех зол: configproto.h:48:19: error: expat.h: Нет такого файла или каталога Проверь чтобы expat.h был в /usr/include
yKpon Posted August 8, 2008 Author Posted August 8, 2008 поставил expat-devel, собралось, надо ещё ядро пересобирать? собираю сейчас на тестовой машине, можно будет собранное как то внедрить в уже работающий старгайзер поставленный из rpm на сервере?
madf Posted August 8, 2008 Posted August 8, 2008 В ядре нужно включить "NFQUEUE" target Support. Кроме того нужно будет соответствующим образом изменить правила firewall. С переносом на другую машину проблем быть не должно
yKpon Posted August 8, 2008 Author Posted August 8, 2008 правила firewall вы имеете ввиду скриптах ACCEPT заменить на QUEUE? какие именно файлы нужно будет заменить на новые на сервере, сам /sbin/stargazer? и совершенно глупый вопрос, просто никогда с этим не сталкивался, как вызвать конфигурацию ядра?
madf Posted August 8, 2008 Posted August 8, 2008 1. В общем случае да. 2. Все бинарники. 3. Это плохо. # cd /usr/src/linux # make menuconfig
madf Posted August 8, 2008 Posted August 8, 2008 cap_ipq у меня вообще не считает никакой трафик Как настроил - так и считает.
yKpon Posted August 8, 2008 Author Posted August 8, 2008 а где можно взять ядро в исходниках для asp11? у меня в дистрах только rpm
madf Posted August 8, 2008 Posted August 8, 2008 Ну если религия не запрещает - можно ванильное поставить...
yKpon Posted August 8, 2008 Author Posted August 8, 2008 [root@boss 2.6.14-1.1653.1asp-i686]# make menuconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c:228:6: warning: "YYSTACK_USE_ALLOCA" is not defined scripts/kconfig/zconf.tab.c:852:5: warning: "YYMAXDEPTH" is not defined HOSTLD scripts/kconfig/mconf HOSTCC scripts/lxdialog/checklist.o In file included from scripts/lxdialog/checklist.c:24: scripts/lxdialog/dialog.h:32:20: error: curses.h: Нет такого файла или каталога In file included from scripts/lxdialog/checklist.c:24: scripts/lxdialog/dialog.h:130: error: syntax error before 'use_colors' scripts/lxdialog/dialog.h:130: warning: type defaults to 'int' in declaration of 'use_colors' scripts/lxdialog/dialog.h:130: warning: data definition has no type or storage c lass scripts/lxdialog/dialog.h:131: error: syntax error before 'use_shadow' scripts/lxdialog/dialog.h:131: warning: type defaults to 'int' in declaration of 'use_shadow' scripts/lxdialog/dialog.h:131: warning: data definition has no type or storage c lass scripts/lxdialog/dialog.h:133: error: syntax error before 'attributes' scripts/lxdialog/dialog.h:133: warning: type defaults to 'int' in declaration of 'attributes' scripts/lxdialog/dialog.h:133: warning: data definition has no type or storage c lass scripts/lxdialog/dialog.h:146: error: syntax error before '*' token scripts/lxdialog/dialog.h:146: warning: function declaration isn't a prototype scripts/lxdialog/dialog.h:149: error: syntax error before '*' token scripts/lxdialog/dialog.h:149: warning: function declaration isn't a prototype scripts/lxdialog/dialog.h:150: error: syntax error before '*' token scripts/lxdialog/dialog.h:150: warning: function declaration isn't a prototype scripts/lxdialog/dialog.h:151: error: syntax error before '*' token scripts/lxdialog/dialog.h:152: warning: function declaration isn't a prototype scripts/lxdialog/dialog.h:153: error: syntax error before '*' token scripts/lxdialog/dialog.h:153: warning: function declaration isn't a prototype scripts/lxdialog/checklist.c:32: error: syntax error before '*' token scripts/lxdialog/checklist.c:34: warning: function declaration isn't a prototype scripts/lxdialog/checklist.c: In function 'print_item': scripts/lxdialog/checklist.c:38: warning: implicit declaration of function 'watt rset' scripts/lxdialog/checklist.c:38: error: 'win' undeclared (first use in this func tion) scripts/lxdialog/checklist.c:38: error: (Each undeclared identifier is reported only once scripts/lxdialog/checklist.c:38: error: for each function it appears in.) scripts/lxdialog/checklist.c:39: warning: implicit declaration of function 'wmov e' scripts/lxdialog/checklist.c:39: error: 'choice' undeclared (first use in this f unction) scripts/lxdialog/checklist.c:41: warning: implicit declaration of function 'wadd ch' scripts/lxdialog/checklist.c:44: error: 'selected' undeclared (first use in this function) scripts/lxdialog/checklist.c:46: warning: implicit declaration of function 'wpri ntw' scripts/lxdialog/checklist.c:46: error: 'status' undeclared (first use in this f unction) scripts/lxdialog/checklist.c:51: warning: implicit declaration of function 'mvwa ddch' scripts/lxdialog/checklist.c:51: error: 'item' undeclared (first use in this fun ction) scripts/lxdialog/checklist.c:53: warning: implicit declaration of function 'wadd str' scripts/lxdialog/checklist.c:56: warning: implicit declaration of function 'wref resh' scripts/lxdialog/checklist.c: At top level: scripts/lxdialog/checklist.c:64: error: syntax error before '*' token scripts/lxdialog/checklist.c:66: warning: function declaration isn't a prototype scripts/lxdialog/checklist.c: In function 'print_arrows': scripts/lxdialog/checklist.c:67: error: 'win' undeclared (first use in this func tion) scripts/lxdialog/checklist.c:67: error: 'y' undeclared (first use in this functi on) scripts/lxdialog/checklist.c:67: error: 'x' undeclared (first use in this functi on) scripts/lxdialog/checklist.c:69: error: 'scroll' undeclared (first use in this f unction) scripts/lxdialog/checklist.c:82: error: 'height' undeclared (first use in this f unction) scripts/lxdialog/checklist.c:85: error: 'item_no' undeclared (first use in this function) scripts/lxdialog/checklist.c:85: error: 'choice' undeclared (first use in this f unction) scripts/lxdialog/checklist.c: At top level: scripts/lxdialog/checklist.c:103: error: syntax error before '*' token scripts/lxdialog/checklist.c:104: warning: function declaration isn't a prototyp e scripts/lxdialog/checklist.c: In function 'print_buttons': scripts/lxdialog/checklist.c:105: error: 'width' undeclared (first use in this f unction) scripts/lxdialog/checklist.c:106: error: 'height' undeclared (first use in this function) scripts/lxdialog/checklist.c:108: error: 'dialog' undeclared (first use in this function) scripts/lxdialog/checklist.c:108: error: 'selected' undeclared (first use in thi s function) scripts/lxdialog/checklist.c: In function 'dialog_checklist': scripts/lxdialog/checklist.c:126: error: 'WINDOW' undeclared (first use in this function) scripts/lxdialog/checklist.c:126: error: 'dialog' undeclared (first use in this function) scripts/lxdialog/checklist.c:126: error: 'list' undeclared (first use in this fu nction) scripts/lxdialog/checklist.c:126: warning: left-hand operand of comma expression has no effect scripts/lxdialog/checklist.c:126: warning: statement with no effect scripts/lxdialog/checklist.c:132: warning: implicit declaration of function 'end win' scripts/lxdialog/checklist.c:133: warning: implicit declaration of function 'fpr intf' scripts/lxdialog/checklist.c:133: warning: incompatible implicit declaration of built-in function 'fprintf' scripts/lxdialog/checklist.c:133: error: 'stderr' undeclared (first use in this function) scripts/lxdialog/checklist.c:150: error: 'COLS' undeclared (first use in this fu nction) scripts/lxdialog/checklist.c:151: error: 'LINES' undeclared (first use in this f unction) scripts/lxdialog/checklist.c:153: error: 'stdscr' undeclared (first use in this function) scripts/lxdialog/checklist.c:155: warning: implicit declaration of function 'new win' scripts/lxdialog/checklist.c:156: warning: implicit declaration of function 'key pad' scripts/lxdialog/checklist.c:156: error: 'TRUE' undeclared (first use in this fu nction) scripts/lxdialog/checklist.c:189: warning: implicit declaration of function 'sub win' scripts/lxdialog/checklist.c:221: warning: implicit declaration of function 'wno utrefresh' scripts/lxdialog/checklist.c:223: warning: implicit declaration of function 'dou pdate' scripts/lxdialog/checklist.c:226: warning: implicit declaration of function 'wge tch' scripts/lxdialog/checklist.c:233: error: 'KEY_UP' undeclared (first use in this function) scripts/lxdialog/checklist.c:233: error: 'KEY_DOWN' undeclared (first use in thi s function) scripts/lxdialog/checklist.c:243: error: 'FALSE' undeclared (first use in this f unction) scripts/lxdialog/checklist.c:244: warning: implicit declaration of function 'scr ollok' scripts/lxdialog/checklist.c:245: warning: implicit declaration of function 'wsc rl' scripts/lxdialog/checklist.c:307: warning: incompatible implicit declaration of built-in function 'fprintf' scripts/lxdialog/checklist.c:308: warning: implicit declaration of function 'del win' scripts/lxdialog/checklist.c:312: error: 'KEY_LEFT' undeclared (first use in thi s function) scripts/lxdialog/checklist.c:313: error: 'KEY_RIGHT' undeclared (first use in th is function) make[2]: *** [scripts/lxdialog/checklist.o] Ошибка 1 make[1]: *** [menuconfig] Ошибка 2 make: *** [menuconfig] Ошибка 2 [root@boss 2.6.14-1.1653.1asp-i686]#
madf Posted August 8, 2008 Posted August 8, 2008 Ну по кернелу саппорт не здесь, но я скажу - для menuconfig нужны ncurses. Или ставь или используй make config
yKpon Posted August 21, 2008 Author Posted August 21, 2008 возможно ли подгружать модуль QUEUE не затрагивая ядро таким образом modprobe iptable_filter modprobe ip_queue ?
madf Posted August 21, 2008 Posted August 21, 2008 Если ты не сделаешь modprobe iptable_filter (и это не сделает iptables за тебя автоматически) - у тебя не будет доступна таблица filter. Если ты не сделаешь modprobe ip_queue (и это не сделает iptables за тебя автоматически) - у тебя не будет доступна цель QUEUE. Я не понимаю, чем так плохо сделать два вызова modprobe. PS: если это чем-то не устраивает - никто не запрещает вкомпилить код этих модулей в ядро.
yKpon Posted August 21, 2008 Author Posted August 21, 2008 madf, вы меня не совсем поняли интересует вопрос можно ли просто прописать эти команды допустим в OnConnect и не затрагивать ядро вообще? а остальное всё по инструкции http://stg.dp.ua/doc20/conf_libipq.html Но! повторюсь, не трогая ядро (а то наломал тут дров как то на днях...)
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