====== Настройка Linux ISG в связке с MikBiLL ====== Для начала [[https://bitbucket.org/sysoleg/lisg/wiki/Home | установите Linux ISG]] ====== Описание ====== Начиная с версии 2.0.6 MikBiLl полностью поддерживает данный тип NAS. Сама система Linux ISG представляет из себя весьма хороший софт для обеспечения достпа типа IPoE/IPNet Так же демонстрирует Весьма высокий HiLoad Пример: * core i7 * 2x dual 1G intel cards ( 2 гигабита трафика) * NAT * шейпер * 4к онлайн абонентов * все это на одной машине Linux ISG в работе с MikBiLL необходимо настроить только как указано ниже и никак иначе. Вы настраиваете все 4 указанных сервиса. Интернет будет шейпаться. Так же отключатся или включатся по необходимости Абонентам в случае отключения интернета будет показывать "страницу без денег" используется сервис типа Tagger(Linux ISG), без него настроить не удастся. Так же абонент даже в случае отключенного интернета будет показываться в онлайн, это особенности работы данной системы. ====== Настройка NAS ====== {{ :billing:nas_access_server:lisg.jpg?nolink& |}} ====== Системные опции ====== В системных опциях указываем имена сервисов (рекомендуем как в примере) {{ :billing:nas_access_server:lisg_opt.jpg?nolink& |}} ====== Пример действующего конфига ====== ===== tc.conf ===== содержимое cat /opt/ISG/etc/tc.conf ## Traffic classes EXAMPLE for lISG ## Format: Class name IPv4 prefix (subnet) #RFC1918 10.0.0.0/8 #RFC1918 192.168.0.0/16 #RFC1918 172.16.0.0/12 LOCAL 192.168.0.0/16 PEER 10.0.2.0/30 #L4REDIR 172.22.0.0/24 # All other traffic EXCEPT for RFC1918, OUR_LOCAL, PEERING and SPECIFIC classes # falls here. PLEASE NOTE THIS! All OTHER traffic, NOT JUST ALL traffic! INET 0.0.0.0/0 ===== config.pl ===== содержимое cat /opt/ISG/etc/config.pl #!/usr/bin/perl -w ### Detach from console after successful start $cfg{daemonize} = 1; ### Log to syslog using this facility $cfg{log_facility} = "local7"; ### RADIUS-related settings ### You can specify as many as you want RADIUS servers. If server with lower index ### is not answering, server with next index will be tried (0, 1, 2, etc...). $cfg{radius_auth}{0} = { server => "192.168.0.1:1812", timeout => 100, secret => "secret" }; $cfg{radius_acct}{0} = { server => "192.168.0.1:1813", timeout => 100, secret => "secret" }; $cfg{nas_identifier} = "LinuxISG"; ## By default equals to NAS IP-address ### CoA-related settings $cfg{coa_server} = "192.168.0.1"; ## Accept requests only from this IP (comment to accept from all) $cfg{coa_secret} = "secret"; ## Shared secret $cfg{coa_port} = 3799; ## Local UDP port to listen for CoA requests ### Send Interim-Update to RADIUS server every session_alive_interval seconds $cfg{session_alive_interval} = 300; ## Every minute (0 = don't send) ### Session inactivity default timeout (disconnect session after this time) (in seconds) $cfg{session_idle_timeout} = 1800; ### Session default maximum duration (end session after this time) (in seconds) $cfg{session_max_duration} = 86400; ### Unauth session maximum duration (end session after this time) (in seconds) $cfg{unauth_session_max_duration} = 60; ### This services will be automatically applied if session was rejected by RADIUS #$cfg{unauth_service_name_list} = [ "ATESTSERV", "AREDIRECT" ]; ### Check traffic classification file MD5 sum every N seconds. If sum was changed re-read this file. $cfg{tc_check_interval} = 300; ## Every 5 minutes ####################### Services description ####################### $cfg{srv}{"INET"}{type} = "policer"; $cfg{srv}{"INET"}{traffic_classes} = [ "INET" ]; $cfg{srv}{"LOCAL"}{traffic_classes} = [ "LOCAL" ]; $cfg{srv}{"PEER"}{traffic_classes} = [ "PEER" ]; $cfg{srv}{"L4REDIR"}{type} = "tagger"; $cfg{srv}{"L4REDIR"}{traffic_classes} = [ "INET" ]; #################### End services description ###################### ### ### It's better not to touch anything below this line ### $cfg{debug} = 1; $cfg{pid_file} = "/var/run/ISGd.pid"; $cfg{radius_dictionary} = $FindBin::RealBin . "/../etc/raddb/dictionary"; $cfg{tc_file} = $FindBin::RealBin . "/../etc/tc.conf" ===== Вывод iptables ===== root@ISG:/opt/ISG/bin# iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination ISG all -- 192.168.55.0/24 0.0.0.0/0 ISG initiator src mode ISG all -- 0.0.0.0/0 192.168.55.0/24 ISG Chain OUTPUT (policy ACCEPT) target prot opt source destination root@ISG:/opt/ISG/bin# iptables -L -n -t nat Chain PREROUTING (policy ACCEPT) target prot opt source destination DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80ISG match service L4REDIR to:192.168.0.1 Chain INPUT (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination