Community discussions

MikroTik App
 
celin07
just joined
Topic Author
Posts: 2
Joined: Tue Jan 09, 2024 2:43 pm

Mikrotik + Pfsense as captive portal

Tue Jan 09, 2024 2:51 pm

Hi guys, i don't know much about network configuration at all, thats my first timing setting a a captive portal and i found some troubles.

On the company network, I have a MikroTik as the default gateway, which is connected to a switch where devices are wired and receive IP addresses via DHCP from the MikroTik in the 192.168.1.0/24 network. For Wi-Fi, I use pfSense with a captive portal.

The pfSense has the IP address 192.168.1.204, its WAN interface is in the 192.168.1.0/24 network, and its LAN interface is in the 192.168.50.0/24 network. PfSense assigns IP addresses via DHCP to clients connected to Wi-Fi.

The networks can communicate with each other, but there is a significant drop in speed when traffic goes from the 192.168.1.0 to the 192.168.50.0 network. Additionally, network discovery does not work correctly. Printers and Wi-Fi cameras cannot be discovered by devices connected directly to the MikroTik, and when configured manually, they work but with extremely low speed.

Firewall rules are configured directly on the MikroTik, with pfSense used solely as a captive portal and for logging user activity.

Any ideas why this happen?
 
User avatar
vingjfg
Member Candidate
Member Candidate
Posts: 291
Joined: Fri Oct 20, 2023 1:45 pm

Re: Mikrotik + Pfsense as captive portal

Tue Jan 09, 2024 4:14 pm

Can you post a network diagram and your MT config?

Regarding network discovery, what protocol is used?
 
celin07
just joined
Topic Author
Posts: 2
Joined: Tue Jan 09, 2024 2:43 pm

Re: Mikrotik + Pfsense as captive portal

Tue Jan 09, 2024 4:49 pm

Can you post a network diagram and your MT config?

Regarding network discovery, what protocol is used?
Thanks for your reply

The protocol used is mDNS

Follows the basic diagram of the network
You do not have the required permissions to view the files attached to this post.
 
User avatar
vingjfg
Member Candidate
Member Candidate
Posts: 291
Joined: Fri Oct 20, 2023 1:45 pm

Re: Mikrotik + Pfsense as captive portal

Tue Jan 09, 2024 6:59 pm

First issue is the local routing: from 192.168.0/24, you likely go to the default gateway before going to the pfsense in order to reach 192.168.50.0/24.

That works but depending on rules and conn tracking and things, this can result in delays. To try, add a route to 192.168.50.0/24 via the pfsense 192.168.1.204. If that confirms it, the idea is to create a transit between pfsense and the MT on a different subnet.

Edit: the route goes on a wired endpoint, of course.

Ah. mDNS is normally a local subnet protocol and not supposed to go through routers. I think MT doesn't have an mDNS reflector, pfsense I don't know off the top of my head but will search.
Last edited by vingjfg on Wed Jan 10, 2024 8:46 am, edited 1 time in total.
 
User avatar
vingjfg
Member Candidate
Member Candidate
Posts: 291
Joined: Fri Oct 20, 2023 1:45 pm

Re: Mikrotik + Pfsense as captive portal

Tue Jan 09, 2024 7:01 pm

Pfsense has an mdns reflector, in the package avahi.
 
gotsprings
Forum Guru
Forum Guru
Posts: 2127
Joined: Mon May 14, 2012 9:30 pm

Re: Mikrotik + Pfsense as captive portal

Wed Jan 10, 2024 1:52 pm

Aren't the 2 subnets supposed to be served by the pfense to make mDNS work.

Your system sounds like router behind router.
 
User avatar
vingjfg
Member Candidate
Member Candidate
Posts: 291
Joined: Fri Oct 20, 2023 1:45 pm

Re: Mikrotik + Pfsense as captive portal

Wed Jan 10, 2024 10:38 pm

Aren't the 2 subnets supposed to be served by the pfense to make mDNS work.

Your system sounds like router behind router.
Well, they are, and not in the way the OP thinks of it. I redrew slightly based on the explanation, the OP's diagram being wrong and misleading. So technically, once Avahi is installed on the pfsense and enabled on both interfaces, the devices will be visible, but probably not reachable: all the machines on the 192.168.1.0/24 will go through the Mikrotik to access the devices on 192.168.50.0/24, and that's not going to play well with conn tracking and all the joyful things given that the pfsense will send the responses directly to the end device.

thiscase.drawio.png
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 3 guests