accel-ppp not working lua file

IPoE related questions
Post Reply
rodrigoselau
Posts: 15
Joined: 13 Nov 2018, 12:32

accel-ppp not working lua file

Post by rodrigoselau » 25 Mar 2020, 13:46

Good morning, I have a problem with my accel-ppp, with ipoe authentication.
Instead of using my lua file, it is sending the interface name.

could they help me?



lua file:

Code: Select all

function username(pkt)
        acid=pkt:agent_circuit_id()
        modAcid=string.gsub(acid, "-", "")
        return modAcid
end
Accel-ppp.log:

Code: Select all

[2020-03-25 10:43:32]:  info: ipoe0: recv [RADIUS(1) Access-Accept id=1 <Vendor-Specific 0x00003a8c0807316b2f316b> <Acct-Interim-Interval 900>]
[2020-03-25 10:43:32]:  info: ipoe0: ens19: authentication succeeded
[2020-03-25 10:43:32]: error: ipoe0: can't determine router address
[2020-03-25 10:43:32]: debug: ipoe0: terminate
[2020-03-25 10:43:32]:  info: ipoe0: ipoe: session finished
[2020-03-25 10:43:32]:  info: ipoe0: recv [DHCPv4 Discover xid=18e5f6fa chaddr=cc:32:e5:a1:44:3e <Message-Type Discover> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4
d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380} {Agent-Remote-ID }>]
[2020-03-25 10:43:32]:  info: ipoe0: send [DHCPv4 Offer xid=18e5f6fa yiaddr=192.168.1.33 chaddr=cc:32:e5:a1:44:3e <Message-Type Offer> <Server-ID 0.0.0.0> <Lease-Time 6000> <T1 3000> <Subnet 255.255.255.255> <
DNS 8.8.8.8,8.8.4.4> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380} {Agent-Remote-ID }>]
[2020-03-25 10:43:33]: debug: ens19: recv [DHCPv4 Request xid=18e5f6fa chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.33> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
[2020-03-25 10:43:33]: debug: ens19: recv [DHCPv4 Request xid=18e5f6fa chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.33> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
[2020-03-25 10:43:36]: debug: ens19: recv [DHCPv4 Request xid=18e5f6fa chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.33> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
[2020-03-25 10:43:36]:  info: send [DHCPv4 Nak xid=18e5f6fa chaddr=cc:32:e5:a1:44:3e <Message-Type Nak> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380} {Agent-Remote-ID }>]
[2020-03-25 10:43:36]: debug: ens19: recv [DHCPv4 Request xid=18e5f6fa chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.33> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
[2020-03-25 10:43:40]:  info: ens19: recv [DHCPv4 Discover xid=3f736255 chaddr=cc:32:e5:a1:44:3e <Message-Type Discover> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4
d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380} {Agent-Remote-ID }>]
[2020-03-25 10:43:40]:  info: ipoe0: create interface ipoe0 parent ens19
[2020-03-25 10:43:40]: debug: ipoe0: radius(1): req_enter 1
[2020-03-25 10:43:40]:  info: ipoe0: send [RADIUS(1) Access-Request id=1 <User-Name "ens19"> <NAS-Identifier "accel-ppp"> <NAS-IP-Address 200.237.115.12> <NAS-Port 340> <NAS-Port-Id "ipoe0"> <NAS-Port-Type Eth
ernet> <Calling-Station-Id "cc:32:e5:a1:44:3e"> <Called-Station-Id "ens19"> <User-Password 0x4ffbaa23d17afc1367f0c3a8a2db659f>]
[2020-03-25 10:43:40]:  warn: ipoe0: radius:packet: vendor 26 not found
[2020-03-25 10:43:40]: debug: ipoe0: radius(1): req_exit 0
[2020-03-25 10:43:40]:  info: ipoe0: recv [RADIUS(1) Access-Accept id=1 <Vendor-Specific 0x00003a8c0807316b2f316b> <Acct-Interim-Interval 900>]
[2020-03-25 10:43:40]:  info: ipoe0: ens19: authentication succeeded
[2020-03-25 10:43:40]: error: ipoe0: can't determine router address
[2020-03-25 10:43:40]: debug: ipoe0: terminate
[2020-03-25 10:43:40]:  info: ipoe0: ipoe: session finished
[2020-03-25 10:43:40]:  info: ipoe0: recv [DHCPv4 Discover xid=3f736255 chaddr=cc:32:e5:a1:44:3e <Message-Type Discover> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4
d53465420352e30> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380} {Agent-Remote-ID }>]
[2020-03-25 10:43:40]:  info: ipoe0: send [DHCPv4 Offer xid=3f736255 yiaddr=192.168.1.34 chaddr=cc:32:e5:a1:44:3e <Message-Type Offer> <Server-ID 0.0.0.0> <Lease-Time 6000> <T1 3000> <Subnet 255.255.255.255> <
DNS 8.8.8.8,8.8.4.4> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380} {Agent-Remote-ID }>]
[2020-03-25 10:43:41]: debug: ens19: recv [DHCPv4 Request xid=3f736255 chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.34> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
[2020-03-25 10:43:41]: debug: ens19: recv [DHCPv4 Request xid=3f736255 chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.34> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
[2020-03-25 10:43:44]: debug: ens19: recv [DHCPv4 Request xid=3f736255 chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.34> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
[2020-03-25 10:43:44]:  info: send [DHCPv4 Nak xid=3f736255 chaddr=cc:32:e5:a1:44:3e <Message-Type Nak> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380} {Agent-Remote-ID }>]
[2020-03-25 10:43:44]: debug: ens19: recv [DHCPv4 Request xid=3f736255 chaddr=cc:32:e5:a1:44:3e <Message-Type Request> <Max-Message-Size 1024> <Client-ID 01cc32e5a1443e> <Host-Name Archer_C5> <Vendor-Class 4d5
3465420352e30> <Request-IP 192.168.1.34> <Server-ID 0.0.0.0> <Request-List Subnet,Router,DNS,Domain-Name,Vendor-Specific,44,46,47,66,Route,Classless-Route,249> <Relay-Agent {Agent-Circuit-ID 1/8/FHTT92e20380}
{Agent-Remote-ID }>]
ipoe config:

Code: Select all

[ipoe]
verbose=1
lua-file=/etc/accel-ppp.lua
username=lua:username
#password=lua:password
lease-time=6000
renew-time=3000
max-lease-time=36000
#unit-cache=1000
#l4-redirect-table=4
#l4-redirect-ipset=l4
#l4-redirect-on-reject=300
#l4-redirect-ip-pool=pool1
shared=1
ifcfg=1
mode=L2
start=dhcpv4
start=up
#ip-unnumbered=1
proxy-arp=1
#nat=0
#proto=100
#relay=10.10.10.10
#vendor=Custom
#weight=0
#attr-dhcp-client-ip=DHCP-Client-IP-Address
#attr-dhcp-router-ip=DHCP-Router-IP-Address
#attr-dhcp-mask=DHCP-Mask
#attr-dhcp-lease-time=DHCP-Lease-Time
#attr-dhcp-opt82=DHCP-Option82
gw-ip-address=200.237.115.12/25
router-ip-address=200.237.115.12
#attr-dhcp-opt82-remote-id=DHCP-Agent-Remote-Id
#attr-dhcp-opt82-circuit-id=DHCP-Agent-Circuit-Id
#attr-l4-redirect=L4-Redirect
#attr-l4-redirect-table=4
#attr-l4-redirect-ipset=l4-redirect
#lua-file=/etc/accel-ppp.lua
#offer-delay=0,100:100,200:200,-1:1000
#vlan-mon=eth0,10-200
#vlan-timeout=60
#vlan-name=%I.%N
ip-pool=ipoe1
#ipv6-pool=ipoe
#ipv6-pool-delegate=ipoe
#idle-timeout=0
#session-timeout=0
#soft-terminate=0
#check-mac-change=1
#calling-sid=mac
#local-net=192.168.0.0/16
interface=ens19

dimka88
Posts: 711
Joined: 13 Oct 2014, 05:51
Contact:

Re: accel-ppp not working lua file

Post by dimka88 » 25 Mar 2020, 22:38

Seems in your config all ok. Check please /var/log/accel-ppp/emerge and core logs.
Did you restart accel? What do you see in logs after restart?
ps:/ Define also gw-ip-address in [ip-pool] section.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest