Subscribe For Free Updates!

We'll not spam mate! We promise.

Sunday, 24 November 2013

PPPoE Simultanous User Login via Single ID Problem

Today I spotted a bug / problem in Mikrotik PPPoE Server in ver 5.14. I don’t know if its a bug or configuration mistake, but it happened on 3 mikrotik boxes with same config. This mikrotik was acting as a simple pppoe server with few users. (defined in secret)
I used the option “One Sesstion Per Host” But still simultaneous connection on single ID was possible.

I tried various method and check every setting multiple times , but no use. I can see multiple pppoe login using same User ID. e.g;

SOLUTION # 1

After banging my head on Mikrotik Wall few minutes , I was able to solve it by using CLI method to instruct pppoe server to USE ONLY ONE session for each ID.
e.g:
 /ppp profile set numbers=1 only-one=yes
(numbers=1 is my pppoe server profile, you can check your profile number by  /ppp profile pr command)
Strange !

SOLUTION # 2

You can create an Script Which will check all connected users Id’s and will see duplication, If found it will disconnect it, you can also disable this ID and log it in any text file for review / management purposes. You can  Schedule it to run after every 10 seconds or any specific time.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
:local userX;
:local userY;
:local i;
:local u;
:local clogged 0;
:local addr;
:local addr2;
 
:foreach i in=[/ppp active find] do={
:set userX [/ppp active get $i name];
:set clogged 0;
 
:foreach u in=[/ppp active find name=$userX ] do={
:set clogged (clogged +1);
 
:if (clogged>1) do={
:set userY [/ppp active get $u name];
:set addr [/ppp active get $u caller-id];
:set addr2 [/ppp active get $i caller-id];
 
:if ($addr != addr2) do={
:log info "MPPP: FIRST ACTIVE <<$userX>> FROM IP $addr2";
:log info "MPPP: THE $clogged° <<$userY>> CALLING FROM IP $addr NOW DISCONNECTED";
/ppp active remove $u;
}
 
}
}
}

Regard’s
naveed ahmad

Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT → , ,
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment

 
".