Dear team,
I have CCR1016-12G board that is working like PPPOE Server, and Dell PowerEdge R710 6-Port that has Mikrotik software installed on it and working as NAT server.
I have Radius server that is connected to PPPOE server which controls the accounts for the users.
I have domain name matrixdatanetwork.net on Godaddy with A record pointing on the real IP address that is placed on NAT server.
I dont want to use NATING on PPPOE server since it takes lots of CPU resources, but I need to redirect all traffic coming from pool of expired users to a local login page that is hosted on the radius, so when the account is expired, the user should get the page to refill his account, and in case the page didnt open (problem with redirecting https pages), he should be able to put in his browser the following for example: matrixdatanetwork.net/user so that a page open to refill his account.
Now, if the user put in his browser 10.10.200.30/user the recharge page opens, but I need him to put matrixdatanetwork.net/user to access the page.
PPPOE Configuration:
/interface ethernet
set [ find default-name=ether1 ] name=ether1-NatServer
set [ find default-name=ether3 ] name=ether3-ProRadius
set [ find default-name=ether12 ] name=ether12-Local
/ip pool
add name=4Mbps-300GB ranges=172.16.152.10-172.16.159.254
add name=expired ranges=172.16.4.10-172.16.7.255
/ppp profile
add dns-server=193.227.177.130,194.126.16.38 local-address=172.16.152.1 name=\
NewRadius remote-address=4Mbps-300GB
add dns-server=10.10.200.10 local-address=172.16.4.1 name=expired remote-address=expired
/ip firewall connection tracking
set enabled=no loose-tcp-tracking=no
/interface pppoe-server server
add authentication=pap,chap default-profile=NewRadius disabled=no interface=\
ether12 service-name=service8
/ip address
add address=192.168.20.2/29 interface=ether1-NatServer network=192.168.20.0
add address=10.10.200.10/24 interface=ether3-ProRadius network=10.10.200.0
/ip dns
set cache-size=4096KiB servers=*.*.*.130,*.*.*.38
/ip firewall address-list
add address=172.16.4.0/22 list=expired
add address=10.10.200.30 list=ProRadius
add address=172.16.152.0/21 list=4Mbps-300GB
/ip proxy
set enabled=yes
/ip proxy access
add dst-address=10.10.200.30
add action=deny redirect-to=matrixnetwork.net/user
/ip route
add distance=1 gateway=192.168.20.1
/radius
add address=10.10.200.30 comment="ProRadius Configuration" secret=****** \
service=ppp timeout=3s
NAT Server Configuration:
/interface ethernet
set [ find default-name=ether1 ] name=ether1-GateWay
set [ find default-name=ether4 ] name=ether4-InternalNetwork
/ip address
add address=192.168.20.1/29 interface=ether4-InternalNetwork network=\
192.168.20.0
add address=*.*.*.59/29 interface=ether1-GateWay network=\
*.*.*.56
/ip dns
set servers=*.*.*.130,*.*.*.38
/ip firewall nat
add action=masquerade chain=srcnat
/ip route
add distance=1 gateway=*.*.*.57
add distance=1 dst-address=172.16.152.0/21 gateway=192.168.20.2
![]()