Script To Load A Specific Webpage

Hello :smiley:
I was woundring if there is a script that can redirect customers that just connected to MT PPPOE server to A specific webpage for few seconds , then they can browse the internet after that normally
if any ideas available i would be so appreciated for sharing them :smiley: :smiley:

You could make a dstnat firewall rule which has a rate limit per src-ip of 1 per day, and it should also match src-address-list=newusers
Then in the pppoe profile, you can specify an “on-connect” script that adds the remote user’s IP to the “newusers” list with a 1hr timeout.
So if they browse the web within an hour, they’ll get redirected by the rule, but only once.

EDIT: The website you redirect the packet to will need to be configured to accept ANY target URL, and reply with a redirect header to whatever “welcome!” page you intend to display. If you like, you could run HTTP proxy on the Mikrotik itself, and create a proxy rule that denies all possible destinations, and replies with a redirect URL to your welcome page (hosted on some other box - ROS can’t be used as a web server). If you use the proxy feature, the dstnat action would be “redirect” with to-ports=8080

well i will try and thanks for your reply

HI I WAS wondering about the script i should put in “on-connect” so it can add the user ip address to the address list:::: if you can help with
Regards