@rds25 said in Captive Portal: Restrict Ports for Allowed IP Address?:
As far as I understand, IPs listed under "Allowed IP Addresses" completely bypass the rules defined in the "PORTAL" tab.
That's what I initially also thought.
This is the portal rule that blocks all portal-to-LAN IPv4 traffic :
[image: 1756797401971-c9aa3733-1739-40f8-b7cf-757f4f3abb37-image.png]
I connected my phone to the portal, it got 192.168.2.10, and then I started to send ICMP packets to 192.168.1.33.
While doing so, I was packet capturing on my portal interface for ICMP traffic, send by 192.168.2.10, my phone.
I saw the packets, ICMP requests, coming in - but no answers logged.
At the same moment, I was :
[25.07.1-RELEASE][root@pfSense.bhf.tld]/root: tail -f /var/log/filter.log
and I saw :
...
<134>1 2025-09-02T09:15:05.661320+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,271,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,1564
<134>1 2025-09-02T09:15:06.661321+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,52479,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,1664
<134>1 2025-09-02T09:15:07.661337+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,19671,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,1764
<134>1 2025-09-02T09:15:08.661389+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,9817,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,1864
<134>1 2025-09-02T09:15:09.661321+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,17809,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,1964
<134>1 2025-09-02T09:15:10.661336+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,16478,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,2064
<134>1 2025-09-02T09:15:11.661399+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,17854,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,2164
<134>1 2025-09-02T09:15:12.661402+02:00 pfSense.bhf.tld filterlog 75062 - - 164,,,1655045805,igc1,match,block,in,4,0x0,,64,34051,0,none,1,icmp,84,192.168.2.10,192.168.1.33,request,63694,2264
...
which tells me that my firewall rule (shown above) was blocking my ICMP requests (to 1492.168.1.33).
GUI equivalent :
[image: 1756797907823-8d2a4a54-06d5-45d4-afb3-c5e359d61e79-image.png]
The firewall log label is "LAN Block" so I knew which firewall rule was blocking, the one I showed above.
This really makes me think that even when you Allow an IP address, the portal's GUI firewall rules still apply.
As soon as I activated this first portal's firewall line :
[image: 1756797755652-ed4331af-495b-42e3-ae7e-5464c718cba4-image.png]
which allows ping packets from the portal interface to go to my LAN, 192.168.1.33, my NAS, ping packets came back / the NAS was replying.