Community discussions

MikroTik App
 
portwolf1982
just joined
Topic Author
Posts: 7
Joined: Mon Mar 30, 2020 4:13 pm

Load external image on captive portal

Mon Mar 30, 2020 4:17 pm

Hello.
I am new to Mikrotik systems and i am having problem to load an external image,that is loaded from an external URL., on the captive portal. Can someone help/advise on that?
Thank you in advance
 
portwolf1982
just joined
Topic Author
Posts: 7
Joined: Mon Mar 30, 2020 4:13 pm

Re: Load external image on captive portal

Mon Mar 30, 2020 8:27 pm

Anyone?
Last edited by portwolf1982 on Mon Mar 30, 2020 9:20 pm, edited 2 times in total.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Load external image on captive portal

Mon Mar 30, 2020 8:43 pm

That maybe getting blocked...
Simply download the Image, load it to your Router, edit the HTML and your image will appear...
 
portwolf1982
just joined
Topic Author
Posts: 7
Joined: Mon Mar 30, 2020 4:13 pm

Re: Load external image on captive portal

Mon Mar 30, 2020 8:55 pm

@Zacharias The thing is that this specific image must be loaded explicitly by the external server, prior of a user is granted access to Internet.
 
User avatar
macsrwe
Forum Guru
Forum Guru
Posts: 1007
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: Load external image on captive portal

Tue Mar 31, 2020 1:37 am

This posting is short on specifics. Is the host containing/generating this image allowed in your set of walled garden hosts?
 
millenium7
Long time Member
Long time Member
Posts: 538
Joined: Wed Mar 16, 2016 6:12 am

Re: Load external image on captive portal

Tue Mar 31, 2020 6:13 am

use the walled garden section to whitelist the URL or IP address
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Load external image on captive portal

Tue Mar 31, 2020 1:13 pm

As i told you in post #3 it may be getting blocked...
In case you must load it externally do as suggested by previous posts and use walled garden...
 
portwolf1982
just joined
Topic Author
Posts: 7
Joined: Mon Mar 30, 2020 4:13 pm

Re: Load external image on captive portal

Fri Apr 03, 2020 9:11 am

Let me clarify some things. There is a project WIFI4EU that demands a specific image to be dynamically displayed on the captive portal the snippet code is the following:
<img id="wifi4eulogo" class="identity-image" src="https://collection.wifi4eu.ec.europa.eu ... 4EU-EL.svg">
Unfortunatelly, that image is not displayed when the rest of the webpage is loaded. Can anyone help on the walled garden cause i have never used that before.
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1070
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Load external image on captive portal

Fri Apr 03, 2020 9:56 am

Let me clarify some things. There is a project WIFI4EU that demands a specific image to be dynamically displayed on the captive portal the snippet code is the following:
<img id="wifi4eulogo" class="identity-image" src="https://collection.wifi4eu.ec.europa.eu ... 4EU-EL.svg">
Unfortunatelly, that image is not displayed when the rest of the webpage is loaded. Can anyone help on the walled garden cause i have never used that before.
Try this:
/ip hotspot walled-garden ip add action=accept disabled=no dst-host=collection.wifi4eu.ec.europa.eu server=hostspot 
Just replace server=hotspot with your hotspot name.
 
portwolf1982
just joined
Topic Author
Posts: 7
Joined: Mon Mar 30, 2020 4:13 pm

Re: Load external image on captive portal

Mon Apr 06, 2020 4:27 pm

Unfortunately the issue persists, even if i have followed your recommendation. The picture still is not being displayed.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Load external image on captive portal

Mon Apr 06, 2020 7:08 pm

I tested and it works just fine... you dont even have to put the site inside the walled garden...
 
portwolf1982
just joined
Topic Author
Posts: 7
Joined: Mon Mar 30, 2020 4:13 pm

Re: Load external image on captive portal

Mon Apr 06, 2020 8:09 pm

I tested and it works just fine... you dont even have to put the site inside the walled garden...
On every device i checked it there is a scrambled thumbnail indicating that there resides an images and nothing more. Strange!
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Load external image on captive portal

Mon Apr 06, 2020 8:22 pm

Did you test on Mobile Devices or Computers too ?
 
portwolf1982
just joined
Topic Author
Posts: 7
Joined: Mon Mar 30, 2020 4:13 pm

Re: Load external image on captive portal

Mon Apr 06, 2020 10:37 pm

Did you test on Mobile Devices or Computers too ?
Both!!
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Load external image on captive portal

Tue Apr 07, 2020 7:45 pm

Try this:
<a href="" target="_blank" style="border: none;"><img src="https://collection.wifi4eu.ec.europa.eu/media/logo/Wifi4EU-EL.svg" alt="mikrotik" /></a>
 
silderan
newbie
Posts: 35
Joined: Mon Sep 21, 2015 12:21 pm

Re: Load external image on captive portal

Fri Jan 29, 2021 9:35 am

Same problem here.

Have anyone solve it?

Looking DNS cache I found that collection.wifi4eu.ec.europa.eu actually is an "alias" of another URL (meaning, collection.wifi4eu.ec.europa.eu has no A record but a CNAME).
Furthermore, this new URL is an alias of another one and so on.

Take a look:
https://dns.google.com/query?name=colle ... .europa.eu

WiFi4EU says that we must allow acces to this URL. That's because if in the future they change the ISP, there is no need to us to update any configuration.

There is any solution to this?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26322
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Load external image on captive portal

Fri Jan 29, 2021 9:45 am

Post your exact config please
 
silderan
newbie
Posts: 35
Joined: Mon Sep 21, 2015 12:21 pm

Re: Load external image on captive portal

Fri Jan 29, 2021 7:46 pm

Ok Here it is.
/interface bridge
add name=bridgeLAN
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-novatel password=xx user=xx
/interface vlan
add interface=ether2 name=vlan21_2 vlan-id=21
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
add dns-name=novatel.hot hotspot-address=10.50.0.1 html-directory=wifi4eu login-by=http-chap,https,mac-cookie name=hsprof
/ip pool
add name=dhcp_gestion ranges=10.56.0.100-10.56.0.254
add name=hs-pool-28 ranges=10.50.0.2-10.50.255.254
/ip dhcp-server
add address-pool=dhcp_gestion disabled=no interface=bridgeLAN name=dhcpGestion
add address-pool=hs-pool-28 disabled=no interface=vlan21_2 name=dhcpHotSpot
/ip hotspot
add address-pool=hs-pool-28 disabled=no interface=vlan21_2 name=hotspot1 profile=hsprof
/interface sstp-client
add connect-to=XXX disabled=no http-proxy=0.0.0.0:4443 name=sstp-novatel password=XXX profile=default-encryption user=XXX
/ip settings
set accept-redirects=yes accept-source-route=yes rp-filter=loose tcp-syncookies=yes
/ip address
add address=192.168.88.2/24 interface=ether8 network=192.168.88.0
add address=10.56.0.1/16 interface=bridgeLAN network=10.56.0.0
add address=10.50.0.1/16 comment="hotspot network" interface=vlan21_2 network=10.50.0.0
/ip dhcp-client
add default-route-distance=2 disabled=no interface=ether1
/ip dhcp-server lease
add address=10.56.0.2 client-id=ff:47:52:c5:8a:0:2:0:0:ab:11:14:65:c4:1c:ea:69:28:db mac-address=74:AC:B9:3D:A4:03 server=dhcpGestion
/ip dhcp-server network
add address=10.50.0.0/16 comment="hotspot network" gateway=10.50.0.1
add address=10.56.0.0/16 dns-server=8.8.8.8,8.8.4.4 gateway=10.56.0.1
/ip dns
set servers=8.8.8.8
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat src-address=10.56.0.0/16
add action=masquerade chain=srcnat comment="masquerade hotspot network" src-address=10.50.0.0/16
/ip hotspot user
add name=admin password=admin
/ip hotspot walled-garden
add dst-host=*collection.wifi4eu.ec.europa.eu* server=hotspot1
/ip route
add distance=3 gateway=192.168.88.1
add distance=1 dst-address=192.168.255.0/24 gateway=172.17.0.1
It's a basic setup for a hotspot.
 
silderan
newbie
Posts: 35
Joined: Mon Sep 21, 2015 12:21 pm

Re: Load external image on captive portal

Wed Feb 03, 2021 2:43 pm

Hello...

I did post code. Is it enough?

Did you prefer me to post a new thread?
 
JoaquimRoca
just joined
Posts: 2
Joined: Mon Jun 28, 2021 7:18 pm

Re: Load external image on captive portal

Mon Jun 28, 2021 7:38 pm

You need to put 13.107.0.0/16 in Walled Garden IP, then work fine.
Last edited by JoaquimRoca on Tue Jun 29, 2021 8:35 am, edited 1 time in total.

Who is online

Users browsing this forum: gkl1368, neskiask and 101 guests