Community discussions

 
undecided
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon May 16, 2011 11:07 am

Welcome page redirect with timer

Wed Jul 03, 2019 12:16 pm

Hi all,
I would like to divert connected users after connecting to wifi to a welcome/splash page. I tried Fewi's post on using the hotspot auto-login method, which works well for desktops/laptops but not for mobile devices.(likely due to the changes on mobile OS security.

I have come across a method using web proxy, problem is is that it does the redirect in the background so the user doesn't see the welcome page.
/ip proxy set enable=yes port="3128"
/ip proxy access add disabled=no action=deny dst-port=80 redirect-to=www.yourdomain.com
/ip firewall nat add chain=dstnat action=redirect to-ports=3128 protocol=tcp dst-port=80
dst-address=!3.3.3.3 src-address-list=!welcome_trap
/ip firewall mangle add chain=postrouting action=add-src-to-address-list
address-list=welcome_trap address-list-timeout=7h protocol=tcp dst-port=80 src-address-list=!welcome_trap dst-address=3.3.3.3

Is there a way to set a timer so that the user is forced to see the landing page for a duration of 15 seconds. So instead of creating the src-address-list immediately it waits 15 seconds before creating it? Or instead of creating the source address list use a "Jump to" and create a rule with a timer?

Any ideas how I can achieve this?
tx

Who is online

Users browsing this forum: No registered users and 106 guests