Установка бесплатной версии Abills с авторизацией по MAC

Установка, настройка, поддержка
joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Пн окт 23, 2017 5:37 pm

Здравствуйте. Установил для теста бесплатную версию Abills в Ubuntu 16.04, в дальнейшем хотим перейти на платную.
У нас на старом биллинге авторизация по MAC адресу, аналогично пытаюсь сделать и на Abills, без привязки до портов.
Это можно сделать на бесплатной верии без покупки модулей?
Для этого установил freeradius2 и accel-ipoe, верно же? При появлении абонента в сети, ему выдается IP из поля Статический IP в Abills, сессия вроде поднимается, но интернет не включается.
Интересует вопрос как сделать чтобы включался интернет и как настроить шейпер.
В документации запутался, так как приходится собирать информацию из разных статей и мало информации.

START/STOP прописал в конфигурационном файле (не помогло)

Код: Выделить всё

$conf{IPN_FW_START_RULE}="/usr/bin/sudo /sbin/iptables -t nat -I PREROUTING 1 -s %IP/%MASK -j ACCEPT;
/usr/bin/sudo iptables -I FORWARD 1 -s %IP -d 0/0 -j ACCEPT;
/usr/bin/sudo iptables -I FORWARD 1 -s 0/0 -d %IP -j ACCEPT";

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение ~AsmodeuS~ » Вт окт 24, 2017 6:32 am

система автоматически поднимает шейпер

этих правил не надо $conf{IPN_FW_START_RULE}

покажите запрос и ответ на радиуса

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Вт окт 24, 2017 6:22 pm

Логи accel-ppp:

Код: Выделить всё

[1;34m[2017-10-24 09:39:32]: debug: [0;39menp2s0: recv [DHCPv4 Request xid=e19025c9 chaddr=bc:ae:c5:68:61:9f <Message-Type Request> <Client-ID 01bcaec568619f> <Request-IP 192.168.0.100> <Host-Name DESKTOP-NRFR418> <Option-81 0000004445534b544f502d4e524652343138> <Vendor-Class 4d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,31,Route,Vendor-Specific,44,46,47,Classless-Route,249,252>]
[1;32m[2017-10-24 09:39:32]:  info: [0;39msend [DHCPv4 Nak xid=e19025c9 chaddr=bc:ae:c5:68:61:9f <Message-Type Nak>]
[1;32m[2017-10-24 09:39:32]:  info: [0;39msend [DHCPv4 Nak xid=e19025c9 chaddr=bc:ae:c5:68:61:9f <Message-Type Nak>]
[1;32m[2017-10-24 09:39:33]:  info: enp2s0: [0;39mrecv [DHCPv4 Discover xid=8475d52a chaddr=bc:ae:c5:68:61:9f <Message-Type Discover> <Client-ID 01bcaec568619f> <Host-Name DESKTOP-NRFR418> <Vendor-Class 4d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,31,Route,Vendor-Specific,44,46,47,Classless-Route,249,252>]
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39mcreate interface ipoe0 parent enp2s0
[1;34m[2017-10-24 09:39:33]: debug: ipoe0: [0;39mradius(1): req_enter 1
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39msend [RADIUS(1) Access-Request id=1 <User-Name "bc:ae:c5:68:61:9f"> <NAS-IP-Address 127.0.0.1> <NAS-Port 6> <NAS-Port-Id "ipoe0"> <NAS-Port-Type Ethernet> <Calling-Station-Id "bc:ae:c5:68:61:9f"> <Called-Station-Id "enp2s0"> <NAS-Identifier "ipoe"> <User-Password >]
[1;34m[2017-10-24 09:39:33]: debug: ipoe0: [0;39mradius(1): req_exit 0
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39mrecv [RADIUS(1) Access-Accept id=1 <Acct-Interim-Interval 300> <Framed-IP-Address 192.168.3.250> <Framed-IP-Netmask 255.255.255.255> <Session-Timeout 604800>]
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39mbc:ae:c5:68:61:9f: authentication succeeded
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39msend [DHCPv4 Offer xid=8475d52a yiaddr=192.168.3.250 chaddr=bc:ae:c5:68:61:9f <Message-Type Offer> <Server-ID 192.168.3.1> <Lease-Time 300> <T1 150> <Router 192.168.3.1> <Subnet 255.255.255.0> <DNS 8.8.8.8>]
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39mrecv [DHCPv4 Request xid=8475d52a chaddr=bc:ae:c5:68:61:9f <Message-Type Request> <Client-ID 01bcaec568619f> <Request-IP 192.168.3.250> <Server-ID 192.168.3.1> <Host-Name DESKTOP-NRFR418> <Option-81 0000004445534b544f502d4e524652343138> <Vendor-Class 4d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,31,Route,Vendor-Specific,44,46,47,Classless-Route,249,252>]
[1;34m[2017-10-24 09:39:33]: debug: ipoe0: [0;39mradius(1): req_enter 1
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39msend [RADIUS(1) Accounting-Request id=1 <User-Name "bc:ae:c5:68:61:9f"> <NAS-IP-Address 127.0.0.1> <NAS-Port 6> <NAS-Port-Id "ipoe0"> <NAS-Port-Type Ethernet> <Calling-Station-Id "bc:ae:c5:68:61:9f"> <Called-Station-Id "enp2s0"> <NAS-Identifier "ipoe"> <Acct-Status-Type Start> <Acct-Authentic RADIUS> <Acct-Session-Id "7d3c91e3cec8f91f"> <Acct-Session-Time 0> <Acct-Input-Octets 0> <Acct-Output-Octets 0> <Acct-Input-Packets 0> <Acct-Output-Packets 0> <Acct-Input-Gigawords 0> <Acct-Output-Gigawords 0> <Framed-IP-Address 192.168.3.250>]
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39msend [DHCPv4 Ack xid=8475d52a yiaddr=192.168.3.250 chaddr=bc:ae:c5:68:61:9f <Message-Type Ack> <Server-ID 192.168.3.1> <Lease-Time 300> <T1 150> <Router 192.168.3.1> <Subnet 255.255.255.0> <DNS 8.8.8.8>]
[1;34m[2017-10-24 09:39:33]: debug: ipoe0: [0;39mradius(1): req_exit 0
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39mrecv [RADIUS(1) Accounting-Response id=1]
[1;32m[2017-10-24 09:39:33]:  info: ipoe0: [0;39mipoe: session started
[1;32m[2017-10-24 09:42:03]:  info: ipoe0: [0;39mrecv [DHCPv4 Request xid=1addbf9b ciaddr=192.168.3.250 chaddr=bc:ae:c5:68:61:9f <Message-Type Request> <Client-ID 01bcaec568619f> <Host-Name DESKTOP-NRFR418> <Option-81 0000004445534b544f502d4e524652343138> <Vendor-Class 4d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,31,Route,Vendor-Specific,44,46,47,Classless-Route,249,252>]
[1;32m[2017-10-24 09:42:03]:  info: ipoe0: [0;39msend [DHCPv4 Ack xid=1addbf9b ciaddr=192.168.3.250 yiaddr=192.168.3.250 chaddr=bc:ae:c5:68:61:9f <Message-Type Ack> <Server-ID 192.168.3.1> <Lease-Time 300> <T1 150> <Router 192.168.3.1> <Subnet 255.255.255.0> <DNS 8.8.8.8>]
В iptables всегда пусто.
Если вручную добавить правило iptables POSTROUTING, то интернет начинает работать без шейпера.
Установлена версия ABillS 0.76.45
Устанавливал вручную по инструкции http://abills.net.ua/wiki/doku.php/abil ... _ubuntu:ru

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Ср окт 25, 2017 6:36 am

В логах Radius:

Код: Выделить всё

Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Attempting to connect to abills@localhost:/abills
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
Wed Oct 25 09:28:04 2017 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Connected new DB handle, #0
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
Wed Oct 25 09:28:04 2017 : Info: rlm_sql_mysql: Starting connect to MySQL server for #1
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Connected new DB handle, #1
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
Wed Oct 25 09:28:04 2017 : Info: rlm_sql_mysql: Starting connect to MySQL server for #2
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Connected new DB handle, #2
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
Wed Oct 25 09:28:04 2017 : Info: rlm_sql_mysql: Starting connect to MySQL server for #3
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Connected new DB handle, #3
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
Wed Oct 25 09:28:04 2017 : Info: rlm_sql_mysql: Starting connect to MySQL server for #4
Wed Oct 25 09:28:04 2017 : Info: rlm_sql (sql): Connected new DB handle, #4
Wed Oct 25 09:28:04 2017 : Info: Loaded virtual server <default>
Wed Oct 25 09:28:04 2017 : Info: Ready to process requests.
Wed Oct 25 09:30:08 2017 : Auth: Login OK: [notebook] (from client NAS_1 port 6 cli bc:ae:c5:68:61:9f)

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение ~AsmodeuS~ » Ср окт 25, 2017 9:25 am

нужно пары access-request и access-request

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Ср окт 25, 2017 9:56 am

Вот:

Код: Выделить всё

	rad_recv: Access-Request packet from host 127.0.0.1 port 48655, id=1, length=131
        User-Name = "d4:ca:6d:79:15:4f"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 6
        NAS-Port-Id = "ipoe0"
        NAS-Port-Type = Ethernet
        Calling-Station-Id = "d4:ca:6d:79:15:4f"
        Called-Station-Id = "enp2s0"
        NAS-Identifier = "ipoe"
        User-Password = "d4:ca:6d:79:15:4f"
# Executing section authorize from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group authorize {
++[preprocess] = ok
++[mschap] = noop
[files] users: Matched entry DEFAULT at line 38
++[files] = ok
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair User-Name = d4:ca:6d:79:15:4f
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group authorize = ok
Found Auth-Type = Perl
# Executing group from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group Perl {
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair User-Name = test
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair Session-Timeout = 604800
rlm_perl: Added pair Acct-Interim-Interval = 300
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group Perl = ok
Login OK: [test] (from client NAS_1 port 6 cli d4:ca:6d:79:15:4f)
# Executing section post-auth from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group post-auth {
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair User-Name = test
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair Session-Timeout = 604800
rlm_perl: Added pair Acct-Interim-Interval = 300
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group post-auth = ok
Sending Access-Accept of id 1 to 127.0.0.1 port 48655
        Framed-IP-Address = 192.168.3.249
        Session-Timeout = 604800
        Acct-Interim-Interval = 300
        Framed-IP-Netmask = 255.255.255.255
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Accounting-Request packet from host 127.0.0.1 port 36997, id=1, length=175
        User-Name = "d4:ca:6d:79:15:4f"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 6
        NAS-Port-Id = "ipoe0"
        NAS-Port-Type = Ethernet
        Calling-Station-Id = "d4:ca:6d:79:15:4f"
        Called-Station-Id = "enp2s0"
        NAS-Identifier = "ipoe"
        Acct-Status-Type = Start
        Acct-Authentic = RADIUS
        Acct-Session-Id = "7d3c91e3cec90111"
        Acct-Session-Time = 0
        Acct-Input-Octets = 0
        Acct-Output-Octets = 0
        Acct-Input-Packets = 0
        Acct-Output-Packets = 0
        Acct-Input-Gigawords = 0
        Acct-Output-Gigawords = 0
        Framed-IP-Address = 192.168.3.249
# Executing section preacct from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group preacct {
++[preprocess] = ok
+} # group preacct = ok
# Executing section accounting from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group accounting {
rlm_perl: Added pair Acct-Output-Octets = 0
rlm_perl: ERROR: Failed to create pair INTERIUM_OUTBYTE = 0
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair Acct-Input-Packets = 0
rlm_perl: Added pair User-Name = d4:ca:6d:79:15:4f
rlm_perl: ERROR: Failed to create pair OUTBYTE2 = 0
rlm_perl: Added pair Acct-Input-Octets = 0
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair Connect-Info =
rlm_perl: ERROR: Failed to create pair INBYTE2 = 0
rlm_perl: Added pair Acct-Session-Id = 7d3c91e3cec90111
rlm_perl: ERROR: Failed to create pair OUTBYTE = 0
rlm_perl: Added pair Acct-Output-Gigawords = 0
rlm_perl: Added pair Acct-Input-Gigawords = 0
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: ERROR: Failed to create pair INTERIUM_OUTBYTE2 = 0
rlm_perl: ERROR: Failed to create pair INTERIUM_INBYTE2 = 0
rlm_perl: Added pair Acct-Output-Packets = 0
rlm_perl: ERROR: Failed to create pair INTERIUM_INBYTE = 0
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair Acct-Authentic = RADIUS
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: ERROR: Failed to create pair INBYTE = 0
rlm_perl: Added pair Acct-Status-Type = Start
rlm_perl: Added pair Acct-Session-Time = 0
++[perl] = ok
+} # group accounting = ok
Sending Accounting-Response of id 1 to 127.0.0.1 port 36997
Finished request 1.
Cleaning up request 1 ID 1 with timestamp +30
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 1 with timestamp +30
Ready to process requests.

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение ~AsmodeuS~ » Ср окт 25, 2017 10:36 am

ненастроены скоростя

Код: Выделить всё

Sending Access-Accept of id 1 to 127.0.0.1 port 48655
        Framed-IP-Address = 192.168.3.249
        Session-Timeout = 604800
        Acct-Interim-Interval = 300
        Framed-IP-Netmask = 255.255.255.255
http://abills.net.ua/wiki/doku.php/abil ... nternet_tp

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Ср окт 25, 2017 10:55 am

Извините, добавил IP тестовому пользователю, а у него был тариф Admin без скоростей, добавил скоростя.

Вот:

Код: Выделить всё

rad_recv: Access-Request packet from host 127.0.0.1 port 58956, id=1, length=131
        User-Name = "d4:ca:6d:79:15:4f"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 6
        NAS-Port-Id = "ipoe0"
        NAS-Port-Type = Ethernet
        Calling-Station-Id = "d4:ca:6d:79:15:4f"
        Called-Station-Id = "enp2s0"
        NAS-Identifier = "ipoe"
        User-Password = "d4:ca:6d:79:15:4f"
# Executing section authorize from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group authorize {
++[preprocess] = ok
++[mschap] = noop
[files] users: Matched entry DEFAULT at line 38
++[files] = ok
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair User-Name = d4:ca:6d:79:15:4f
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group authorize = ok
Found Auth-Type = Perl
# Executing group from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group Perl {
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair User-Name = test
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair Session-Timeout = 604800
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair Acct-Interim-Interval = 300
rlm_perl: ERROR: Failed to create pair PPPD-Upstream-Speed-Limit = 10240
rlm_perl: ERROR: Failed to create pair PPPD-Downstream-Speed-Limit = 10240
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group Perl = ok
Login OK: [test] (from client NAS_1 port 6 cli d4:ca:6d:79:15:4f)
# Executing section post-auth from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group post-auth {
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair User-Name = test
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair Session-Timeout = 604800
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair Acct-Interim-Interval = 300
rlm_perl: ERROR: Failed to create pair PPPD-Upstream-Speed-Limit = 10240
rlm_perl: ERROR: Failed to create pair PPPD-Downstream-Speed-Limit = 10240
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group post-auth = ok
Sending Access-Accept of id 1 to 127.0.0.1 port 58956
        Framed-IP-Netmask = 255.255.255.255
        Session-Timeout = 604800
        Framed-IP-Address = 192.168.3.249
        Acct-Interim-Interval = 300
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Accounting-Request packet from host 127.0.0.1 port 39977, id=1, length=175
        User-Name = "d4:ca:6d:79:15:4f"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 6
        NAS-Port-Id = "ipoe0"
        NAS-Port-Type = Ethernet
        Calling-Station-Id = "d4:ca:6d:79:15:4f"
        Called-Station-Id = "enp2s0"
        NAS-Identifier = "ipoe"
        Acct-Status-Type = Start
        Acct-Authentic = RADIUS
        Acct-Session-Id = "7d3c91e3cec904fa"
        Acct-Session-Time = 0
        Acct-Input-Octets = 0
        Acct-Output-Octets = 0
        Acct-Input-Packets = 0
        Acct-Output-Packets = 0
        Acct-Input-Gigawords = 0
        Acct-Output-Gigawords = 0
        Framed-IP-Address = 192.168.3.249
# Executing section preacct from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group preacct {
++[preprocess] = ok
+} # group preacct = ok
# Executing section accounting from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group accounting {
rlm_perl: ERROR: Failed to create pair INTERIUM_INBYTE2 = 0
rlm_perl: ERROR: Failed to create pair INTERIUM_OUTBYTE = 0
rlm_perl: Added pair Acct-Input-Gigawords = 0
rlm_perl: Added pair Connect-Info =
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: ERROR: Failed to create pair INBYTE = 0
rlm_perl: ERROR: Failed to create pair OUTBYTE = 0
rlm_perl: Added pair Acct-Output-Gigawords = 0
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair Acct-Output-Octets = 0
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Acct-Session-Id = 7d3c91e3cec904fa
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair Acct-Input-Octets = 0
rlm_perl: Added pair Acct-Output-Packets = 0
rlm_perl: ERROR: Failed to create pair INBYTE2 = 0
rlm_perl: ERROR: Failed to create pair OUTBYTE2 = 0
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair User-Name = d4:ca:6d:79:15:4f
rlm_perl: Added pair Acct-Authentic = RADIUS
rlm_perl: Added pair Acct-Session-Time = 0
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: ERROR: Failed to create pair INTERIUM_OUTBYTE2 = 0
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: ERROR: Failed to create pair INTERIUM_INBYTE = 0
rlm_perl: Added pair Acct-Status-Type = Start
rlm_perl: Added pair Acct-Input-Packets = 0
++[perl] = ok
+} # group accounting = ok
Sending Accounting-Response of id 1 to 127.0.0.1 port 39977
Finished request 1.
Cleaning up request 1 ID 1 with timestamp +28
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 1 with timestamp +28
Ready to process requests.

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Ср окт 25, 2017 11:36 am

Наверно нужно добавить в radius те же пары что и в accell-ppp?
А то в инструкции http://abills.net.ua/wiki/doku.php/abil ... el_ipoe:ru написано только:
Добавить пары в словарь radius
raddb/dictionary
ATTRIBUTE DHCP-Router-IP-Address 241 ipaddr ATTRIBUTE DHCP-Mask 242 integer ATTRIBUTE L4-Redirect 243 integer ATTRIBUTE L4-Redirect-ipset 244 string ATTRIBUTE DHCP-Option82 245 octets
Добавил пары в radius, теперь такое (интернета нет):

Код: Выделить всё

rad_recv: Access-Request packet from host 127.0.0.1 port 56689, id=1, length=131
        User-Name = "d4:ca:6d:79:15:4f"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 6
        NAS-Port-Id = "ipoe0"
        NAS-Port-Type = Ethernet
        Calling-Station-Id = "d4:ca:6d:79:15:4f"
        Called-Station-Id = "enp2s0"
        NAS-Identifier = "ipoe"
        User-Password = "d4:ca:6d:79:15:4f"
# Executing section authorize from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group authorize {
++[preprocess] = ok
++[mschap] = noop
[files] users: Matched entry DEFAULT at line 38
++[files] = ok
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair User-Name = d4:ca:6d:79:15:4f
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group authorize = ok
Found Auth-Type = Perl
# Executing group from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group Perl {
rlm_perl: Added pair User-Name = test
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair PPPD-Upstream-Speed-Limit = 10240
rlm_perl: Added pair Session-Timeout = 604800
rlm_perl: Added pair Acct-Interim-Interval = 300
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair PPPD-Downstream-Speed-Limit = 10240
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group Perl = ok
Login OK: [test] (from client NAS_1 port 6 cli d4:ca:6d:79:15:4f)
# Executing section post-auth from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group post-auth {
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair User-Name = test
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair User-Password = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair PPPD-Upstream-Speed-Limit = 10240
rlm_perl: Added pair Session-Timeout = 604800
rlm_perl: Added pair Acct-Interim-Interval = 300
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair PPPD-Downstream-Speed-Limit = 10240
rlm_perl: Added pair Auth-Type = Perl
++[perl] = ok
+} # group post-auth = ok
Sending Access-Accept of id 1 to 127.0.0.1 port 56689
        Framed-IP-Address = 192.168.3.249
        PPPD-Upstream-Speed-Limit = 10240
        Session-Timeout = 604800
        Acct-Interim-Interval = 300
        Framed-IP-Netmask = 255.255.255.255
        PPPD-Downstream-Speed-Limit = 10240
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Accounting-Request packet from host 127.0.0.1 port 41618, id=1, length=175
        User-Name = "d4:ca:6d:79:15:4f"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 6
        NAS-Port-Id = "ipoe0"
        NAS-Port-Type = Ethernet
        Calling-Station-Id = "d4:ca:6d:79:15:4f"
        Called-Station-Id = "enp2s0"
        NAS-Identifier = "ipoe"
        Acct-Status-Type = Start
        Acct-Authentic = RADIUS
        Acct-Session-Id = "7d3c91e3cec90ccc"
        Acct-Session-Time = 0
        Acct-Input-Octets = 0
        Acct-Output-Octets = 0
        Acct-Input-Packets = 0
        Acct-Output-Packets = 0
        Acct-Input-Gigawords = 0
        Acct-Output-Gigawords = 0
		        Framed-IP-Address = 192.168.3.249
# Executing section preacct from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group preacct {
++[preprocess] = ok
+} # group preacct = ok
# Executing section accounting from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
+group accounting {
rlm_perl: Added pair User-Name = d4:ca:6d:79:15:4f
rlm_perl: Added pair Acct-Input-Octets = 0
rlm_perl: Added pair Called-Station-Id = enp2s0
rlm_perl: Added pair NAS-Identifier = ipoe
rlm_perl: Added pair Framed-IP-Address = 192.168.3.249
rlm_perl: Added pair NAS-Port-Id = ipoe0
rlm_perl: Added pair Connect-Info =
rlm_perl: ERROR: Failed to create pair INBYTE = 0
rlm_perl: Added pair Calling-Station-Id = d4:ca:6d:79:15:4f
rlm_perl: Added pair Acct-Output-Octets = 0
rlm_perl: Added pair Acct-Session-Id = 7d3c91e3cec90ccc
rlm_perl: Added pair Acct-Session-Time = 0
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: ERROR: Failed to create pair INTERIUM_INBYTE = 0
rlm_perl: Added pair Acct-Output-Packets = 0
rlm_perl: Added pair Acct-Input-Gigawords = 0
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair Acct-Authentic = RADIUS
rlm_perl: ERROR: Failed to create pair OUTBYTE = 0
rlm_perl: ERROR: Failed to create pair INTERIUM_OUTBYTE2 = 0
rlm_perl: Added pair Acct-Input-Packets = 0
rlm_perl: ERROR: Failed to create pair INTERIUM_OUTBYTE = 0
rlm_perl: ERROR: Failed to create pair INTERIUM_INBYTE2 = 0
rlm_perl: Added pair Acct-Output-Gigawords = 0
rlm_perl: ERROR: Failed to create pair OUTBYTE2 = 0
rlm_perl: Added pair NAS-Port = 6
rlm_perl: ERROR: Failed to create pair INBYTE2 = 0
rlm_perl: Added pair Acct-Status-Type = Start
++[perl] = ok
+} # group accounting = ok
Sending Accounting-Response of id 1 to 127.0.0.1 port 41618
Finished request 1.
Cleaning up request 1 ID 1 with timestamp +27
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 1 with timestamp +27
Ready to process requests.

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение ~AsmodeuS~ » Ср окт 25, 2017 12:00 pm

1. это само собой по парам радиуса
2. билинг отдает все что нужно, Вам остается только сделать чтофбы фаервол пускал с той сети что accel и все взлетит

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Ср окт 25, 2017 12:34 pm

Добавил в iptables правило:

Код: Выделить всё

iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -j SNAT --to-source 192.168.1.1
Интернет начал работать с шейпером.
Но если отключить учетную запись в биллинге, то тогда интернет работает без шейпера и не блокируется доступ к интернету.
Как сделать чтобы блокировался доступ?

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Вт окт 31, 2017 7:37 am

подскажите в чем может быть причина

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение ~AsmodeuS~ » Вт окт 31, 2017 9:13 am

фаервол не настроен правильно, для авторизированных выдавайте одни ип для других другие

joz223
Сообщения: 11
Зарегистрирован: Сб окт 21, 2017 12:19 pm

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение joz223 » Вт окт 31, 2017 2:30 pm

shaper_start.sh не нужно настраивать?

Команда sudo /usr/abills/libexec/billd -all должна блокировать доступ клиенту если он отключен в биллинге?

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Установка бесплатной версии Abills с авторизацией по MAC

Сообщение ~AsmodeuS~ » Вт окт 31, 2017 4:12 pm

joz223 писал(а):shaper_start.sh не нужно настраивать?
елис нужны функции оттуда тогда нужно
joz223 писал(а): Команда sudo /usr/abills/libexec/billd -all должна блокировать доступ клиенту если он отключен в биллинге?
скидывает сессии с ацеля

Ответить