i have a problem changing username sent to radius (it is aways interface that packet is received). I need it to be MAC address of the client. That is a problem because IPOE session is terminated when more than 1 user tries to connect to same interface.
my ipoe config is:
Code: Select all
[ipoe]
verbose=1
lua-file=/etc/accel-ppp.lua
calling-sid=mac
username=lua:if_mac
password=ipoe-challenge
lease-time=600
max-lease-time=3600
shared=1
ifcfg=1
proto=100
mode=L2
start=dhcpv4
interface=eth2.517
Code: Select all
#!lua
function if_mac(pkt)
return pkt:hwaddr()
end
Next is actual log file when packets are exchanging:
Code: Select all
[2024-11-02 09:52:17.068] eth2.517: recv [DHCPv4 Request xid=6e6ab61d ciaddr=10.10.108.103 chaddr=54:e1:ad:4a:27:b7 <Message-Type Request> <Client-ID 0154e1ad4a27b7> <Host-Name lenovo> <Option-81 0000006c656e6f766f> <Vendor-Class 4d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,31,Route,Vendor-Specific,44,46,47,119,Classless-Route,249,252>]
[2024-11-02 09:52:17.068] send [DHCPv4 Nak xid=6e6ab61d chaddr=54:e1:ad:4a:27:b7 <Message-Type Nak> <Server-ID 10.10.108.1> <Message Session dosn't exist>]
[2024-11-02 09:52:17.150] eth2.517: : recv [DHCPv4 Discover xid=7a9cba72 chaddr=54:e1:ad:4a:27:b7 <Message-Type Discover> <Client-ID 0154e1ad4a27b7> <Host-Name lenovo> <Vendor-Class 4d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,31,Route,Vendor-Specific,44,46,47,119,Classless-Route,249,252>]
[2024-11-02 09:52:17.150] ipoe0: 5e524b86fc04fc39: create interface ipoe0 parent eth2.517
[2024-11-02 09:52:17.150] ipoe0: 5e524b86fc04fc39: radius(1): req_enter 1
[2024-11-02 09:52:17.150] ipoe0: 5e524b86fc04fc39: send [RADIUS(1) Access-Request id=1 <User-Name "eth2.517"> <NAS-Identifier "MyACCT-SF"> <NAS-IP-Address 127.0.0.1> <NAS-Port 129> <NAS-Port-Id "ipoe0"> <NAS-Port-Type Ethernet> <Calling-Station-Id "54:e1:ad:4a:27:b7"> <Called-Station-Id "eth2.517"> <User-Password 0x37e707fb34c2a773cea63853beac940f>]
[2024-11-02 09:52:17.242] ipoe0: 5e524b86fc04fc39: radius(1): req_exit 0
[2024-11-02 09:52:17.242] ipoe0: 5e524b86fc04fc39: recv [RADIUS(1) Access-Accept id=1 <DHCP-Router-Address 0xc3456c01> <DHCP-Gateway-IP-Address 10.10.108.1> <DHCP-Subnet-Mask 255.255.255.0> <Framed-IP-Netmask 255.255.255.0> <Framed-IP-Address 10.10.108.103> <Framed-IPv6-Prefix 2a05:4c00:ffff:ffff:ffff:ffff:ffff:aaac/128> <Framed-Interface-Id ffff:ffff:ffff:aaac> <MS-Primary-DNS-Server 10.10.109.188> <MS-Secondary-DNS-Server 10.10.109.190> <DNS-Server-IPv6-Address 2a05:4c00:aaa1:aaa1::1> <DNS-Server-IPv6-Address 2001:4860:4860::8844> <DHCP-Domain-Name-Server 0xc3456dbc> <DHCP-Domain-Name-Server 0xc3456dbe>]
[2024-11-02 09:52:17.242] ipoe0: 5e524b86fc04fc39: eth2.517: authentication succeeded
[2024-11-02 09:52:17.242] ipoe0: 5e524b86fc04fc39: send [DHCPv4 Offer xid=7a9cba72 yiaddr=10.10.108.103 chaddr=54:e1:ad:4a:27:b7 <Message-Type Offer> <Server-ID 10.10.108.1> <Lease-Time 600> <T1 300> <T2 525> <Router 10.10.108.1> <Subnet 255.255.255.0> <DNS 10.10.109.188,10.10.109.190>]
[2024-11-02 09:52:17.252] ipoe0: 5e524b86fc04fc39: recv [DHCPv4 Request xid=7a9cba72 chaddr=54:e1:ad:4a:27:b7 <Message-Type Request> <Client-ID 0154e1ad4a27b7> <Request-IP 10.10.108.103> <Server-ID 10.10.108.1> <Host-Name lenovo> <Option-81 0000006c656e6f766f> <Vendor-Class 4d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,31,Route,Vendor-Specific,44,46,47,119,Classless-Route,249,252>]
[2024-11-02 09:52:17.252] ipoe0: 5e524b86fc04fc39: ipoe: activate session
[2024-11-02 09:52:17.252] ipoe0: 5e524b86fc04fc39: radius(1): req_enter 1
[2024-11-02 09:52:17.252] ipoe0: 5e524b86fc04fc39: send [RADIUS(1) Accounting-Request id=1 <User-Name "eth2.517"> <NAS-Identifier "MyACCT-SF"> <NAS-IP-Address 127.0.0.1> <NAS-Port 129> <NAS-Port-Id "ipoe0"> <NAS-Port-Type Ethernet> <Calling-Station-Id "54:e1:ad:4a:27:b7"> <Called-Station-Id "eth2.517"> <Acct-Status-Type Start> <Acct-Authentic RADIUS> <Acct-Session-Id "5e524b86fc04fc39"> <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 10.10.108.103>]
[2024-11-02 09:52:17.252] ipoe0: 5e524b86fc04fc39: send [DHCPv4 Ack xid=7a9cba72 yiaddr=10.10.108.103 chaddr=54:e1:ad:4a:27:b7 <Message-Type Ack> <Server-ID 10.10.108.1> <Lease-Time 600> <T1 300> <T2 525> <Router 10.10.108.1> <Subnet 255.255.255.0> <DNS 10.10.109.188,10.10.109.190>]
[2024-11-02 09:52:17.255] ipoe0: 5e524b86fc04fc39: radius(1): req_exit 0
[2024-11-02 09:52:17.255] ipoe0: 5e524b86fc04fc39: recv [RADIUS(1) Accounting-Response id=1]
[2024-11-02 09:52:17.255] ipoe0: 5e524b86fc04fc39: ipoe: session started