xebd / accel-ppp

High performance PPTP/L2TP/PPPoE/IPoE server for Linux
GNU General Public License v2.0
299 stars 107 forks source link

error : no free ipv4 using pppoe server #161

Closed isslam95 closed 2 years ago

isslam95 commented 2 years ago

i keep getting (no free ipv4)

what i did i added this address to lo interface 100.64.0.1 with this command ip addr add 100.64.0.1dev lo and then route add -host 100.64.0.1 dev lo and i created this config file with this parameters

[modules]
log_file
pppoe
auth_pap
chap-secrets
ippool
shaper

[core]
log-error=/var/log/accel-ppp/core.log
thread-count=4

[ppp]
verbose=1
min-mtu=1365
mtu=1372
mru=1368
ipv4=require
ipv6=deny
lcp-echo-interval=20
lcp-echo-timeout=120

[pppoe]
verbose=1
ip-pool=pool_pppoe
interface=enp0s25

[dns]
dns1=8.8.8.8

[ip-pool]
gw-ip-address=100.64.0.1
100.64.0.0/24,name=pool_pppoe

[log]
log-file=/var/log/accel-ppp/accel-ppp.log
log-emerg=/var/log/accel-ppp/emerg.log
log-fail-file=/var/log/accel-ppp/auth-fail.log
copy=1
level=5

[chap-secrets]
gw-ip-address=100.64.0.1
chap-secrets=/etc/chap-secrets

[shaper]
up-limiter=police
down-limiter=tbf
verbose=1

[cli]
verbose=1
telnet=127.0.0.1:2000
tcp=127.0.0.1:2001

and the output of /var/log/accel-ppp/accel-ppp.log


2021-11-25 01:46:59]: debug: enp0s25: lcp_layer_init
[2021-11-25 01:46:59]: debug: enp0s25: auth_layer_init
[2021-11-25 01:46:59]: debug: enp0s25: ccp_layer_init
[2021-11-25 01:46:59]: debug: enp0s25: ipcp_layer_init
[2021-11-25 01:46:59]: debug: enp0s25: ipv6cp_layer_init
[2021-11-25 01:46:59]: debug: enp0s25: ppp establishing
[2021-11-25 01:46:59]: debug: enp0s25: lcp_layer_start
[2021-11-25 01:46:59]:  info: enp0s25: send [LCP ConfReq id=ec <auth PAP> <mru 1368> <magic 02c8031f>]
[2021-11-25 01:46:59]:  info: enp0s25: recv [LCP ConfReq id=1 <mru 1492> <magic 8a06f61a>]
[2021-11-25 01:46:59]:  info: enp0s25: send [LCP ConfAck id=1]
[2021-11-25 01:46:59]:  info: enp0s25: recv [LCP ConfAck id=ec <auth PAP> <mru 1368> <magic 02c8031f>]
[2021-11-25 01:46:59]: debug: enp0s25: lcp_layer_started
[2021-11-25 01:46:59]: debug: enp0s25: auth_layer_start
[2021-11-25 01:46:59]: debug: enp0s25: recv [LCP EchoReq id=0 <magic 8a06f61a>]
[2021-11-25 01:46:59]: debug: enp0s25: send [LCP EchoRep id=0 <magic 02c8031f>]
[2021-11-25 01:46:59]:  info: enp0s25: recv [PAP AuthReq id=1]
[2021-11-25 01:46:59]:  info: ppp1: connect: ppp1 <--> pppoe(08:00:27:e8:a0:8f)
[2021-11-25 01:46:59]: debug: ppp1: ppp connected
[2021-11-25 01:46:59]:  info: ppp1: send [PAP AuthAck id=1 "Authentication succeeded"]
[2021-11-25 01:46:59]:  info: ppp1: isso: authentication succeeded
[2021-11-25 01:46:59]: debug: ppp1: auth_layer_started
[2021-11-25 01:46:59]: debug: ppp1: ccp_layer_start
[2021-11-25 01:46:59]: debug: ppp1: ipcp_layer_start
[2021-11-25 01:46:59]:  warn: ppp1: ppp: no free IPv4 address
[2021-11-25 01:46:59]: debug: ppp1: terminate
[2021-11-25 01:46:59]: debug: ppp1: lcp_layer_finish
[2021-11-25 01:46:59]:  info: ppp1: send [LCP TermReq id=238]
[2021-11-25 01:46:59]: debug: ppp1: auth_layer_finish
[2021-11-25 01:46:59]: debug: ppp1: auth_layer_finished
[2021-11-25 01:46:59]: debug: ppp1: ccp_layer_finish
[2021-11-25 01:46:59]: debug: ppp1: ccp_layer_finished
[2021-11-25 01:46:59]: debug: ppp1: ipcp_layer_finish
[2021-11-25 01:46:59]: debug: ppp1: ipcp_layer_finished
[2021-11-25 01:46:59]:  warn: ppp1: IPCP: discarding packet
[2021-11-25 01:46:59]:  warn: ppp1: IPV6CP: discarding packet
[2021-11-25 01:46:59]:  info: ppp1: recv [LCP TermAck id=ee]
[2021-11-25 01:46:59]: debug: ppp1: lcp_layer_finished
[2021-11-25 01:46:59]: debug: ppp1: pppoe: ppp finished
[2021-11-25 01:46:59]: debug: ppp1: lcp_layer_free
[2021-11-25 01:46:59]: debug: ppp1: auth_layer_free
[2021-11-25 01:46:59]: debug: ppp1: ccp_layer_free
[2021-11-25 01:46:59]: debug: ppp1: ipcp_layer_free
[2021-11-25 01:46:59]: debug: ppp1: ipv6cp_layer_free
[2021-11-25 01:46:59]: debug: ppp1: ppp destablished
[2021-11-25 01:46:59]:  info: enp0s25: send [PPPoE PADT 84:2b:2b:a9:6e:5e => 08:00:27:e8:a0:8f sid=4d80 <AC-Name accel-ppp> <Service-Name >]
[2021-11-25 01:46:59]:  info: ppp1: disconnected
[2021-11-25 01:46:59]:  info: enp0s25: recv [PPPoE PADI 08:00:27:e8:a0:8f => ff:ff:ff:ff:ff:ff sid=0000 <Service-Name > <Host-Uniq 703c0000>]
[2021-11-25 01:46:59]:  info: enp0s25: send [PPPoE PADO 84:2b:2b:a9:6e:5e => 08:00:27:e8:a0:8f sid=0000 <AC-Name accel-ppp> <Service-Name > <AC-Cookie 0e0c35860c881e1baabe0b35e43be3bfd6bc846a4216f56e> <Host-Uniq 703c0000>]
[2021-11-25 01:46:59]:  info: enp0s25: recv [PPPoE PADR 08:00:27:e8:a0:8f => 84:2b:2b:a9:6e:5e sid=0000 <Service-Name > <Host-Uniq 703c0000> <AC-Cookie 0e0c35860c881e1baabe0b35e43be3bfd6bc846a4216f56e>]
[2021-11-25 01:46:59]:  info: enp0s25: send [PPPoE PADS 84:2b:2b:a9:6e:5e => 08:00:27:e8:a0:8f sid=4dc0 <AC-Name accel-ppp> <Service-Name > <Host-Uniq 703c0000>]
[2021-11-25 01:46:59]: debug: enp0s25: lcp_layer_init
[2021-11-25 01:46:59]: debug: enp0s25: auth_layer_init
[2021-11-25 01:46:59]: debug: enp0s25: ccp_layer_init
svlobanov commented 2 years ago

try to use non-named pool -100.64.0.0/24,name=pool_pppoe +100.64.0.0/24

isslam95 commented 2 years ago

still doesn't work

isslam95 commented 2 years ago

I FINALLY figure out It was /etc/cheap-secrets file i forgot to put * on ip address section thanks for help