Community discussions

MikroTik App
 
YasserAhmad
newbie
Topic Author
Posts: 33
Joined: Mon Jul 17, 2017 9:41 pm

how to prevent specific users from being connected as pppoe

Wed May 08, 2019 1:07 pm

Hi,
I have two types of services: ppp and hotspot. Mikrotik with DMA radius manager
when creating pppoe user I mark the username for example: all pppoe users are starting with "6". those users are only allowed to connect through this service.
I am searching for script to prevent specific users from being connected to pppoe. can you help me?
the script should check on user login whether the username is starting with number 6 or not. if it is starting with number 6 then allow the connection, if it is not starting with number 6 it should not allow the user to connect or at least connect this user each one minute or so.

I appreciate your help,
thanks a lot
 
pe1chl
Forum Guru
Forum Guru
Posts: 10197
Joined: Mon Jun 08, 2015 12:09 pm

Re: how to prevent specific users from being connected as pppoe

Wed May 08, 2019 2:56 pm

Can't you configure the radius server to allow/deny users depending on the service they request?
Sometimes you can use tricks. E.g. the users that are not allowed to use PPPoE are configured with an invalid IP address.
Then when they connect they get that invalid IP (like 127.0.0.2) and when they use hotspot the IP is not used and they can connect OK.
 
YasserAhmad
newbie
Topic Author
Posts: 33
Joined: Mon Jul 17, 2017 9:41 pm

Re: how to prevent specific users from being connected as pppoe

Sun May 12, 2019 4:43 pm

Can't you configure the radius server to allow/deny users depending on the service they request?
Sometimes you can use tricks. E.g. the users that are not allowed to use PPPoE are configured with an invalid IP address.
Then when they connect they get that invalid IP (like 127.0.0.2) and when they use hotspot the IP is not used and they can connect OK.
in DMA Radius manager no, it can't be done, I can't configure the radius server to allow/deny users depending on the service they request. I tried the trick you mentioned above, I gave the user static IP used by hotspot, when the connect to pppoe connection with that static IP they can still have internet connection. so it doesn't work.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10197
Joined: Mon Jun 08, 2015 12:09 pm

Re: how to prevent specific users from being connected as pppoe

Sun May 12, 2019 6:58 pm

But can't you give them some IP that does not provide them with service?
Like 127.0.0.2 or some IP internal to your network range that you block in the firewall.
Then they can still connect with PPPoE of course but nothing can be done with that connection.

Who is online

Users browsing this forum: No registered users and 12 guests