What is the proper way to allow Geo access to specific country?
-
This post is deleted! -
I see your point.
Now my issue is - say you want to go to Europe, Amsterdam and be able to connect from there.Do you you see that the way you described is easy and more importantly can be tested before you left ?
There are out to be an easy way to turn on and off country access.
But what that is ...
-
Yes, you're right. It might be sth like a blind flight (In Germany we say so, say like flying with both eyes closed)...
In that case I would have had two options, I see.
One is the trusting in the Solution as much as is possible, what I recommend and just check all Lists for that Country I am going to and be sure that I even made that "Force Update" to be sure that the Firewall Rules are updated with the new Statements.
Second Option might be, if it should be an unsafe Country, to purchase an external VPN for that time just for not having to connect to my own (more unsecured) VPN. (but IDK if Mexico is like that..)Actually I guess it is really easy if the rules will be applied before such a situation comes up.
The only thing I never (!) would do is to get into my own Network remotely. (others do, and are fine with that..anyway)
I do not mean into the subtunneled VPN that should be logically separated from the rest of the Network but I mean to login anywhere instead of that VPN, e.g. for reconfiguring or so.Hey, if you're on a Journey / Holidays I wish you a very nice Time, enjoy your time. (and stay safe)
-
Happy Holidays to you too !
-
I'm reading so much about buying VPN so you can dial into and have a US IP so you can access your firewall. But why on earth do you not just allow yourself to connect via VPN to your own pfSense instance (globally)? There's no real point to limit e.g. a VPN dial in port to the US only - so why not simply open the OpenVPN port (or configure it to something else) globally and have your VPN and be good? Much simpler than controlling if your IP is allowed or not and much more secure as you don't have to leave any other ports open?
Greets
-
I acknowledged in the initial post:
"PS: I think, the way to use VPN to the US first is a good way, but would like to understand how to do the same via pfbNG settings"
So yes this is a way.
However, in case you need to connect to your pfSense router via OpenVPN you would need to have another VPN (not using OpenVPN UI) in order to connect to the US first. And usually in the 3d countries Internet speeds maybe low and it maybe difficult.
Thx
-
Here is how we do it:
In Firewall/pfBlockerNG/IPv4 add an alias, for example we have "GeoIP US v4". Under IPv4 Lists we have two entries looking at two files that pfBlocker creates already...change the country code as desired:
/usr/local/share/GeoIP/cc/US_v4.txt
/usr/local/share/GeoIP/cc/US_rep_v4.txt
The header/label column is not important AFAIK but we have used the country code, e.g. ITS_GeopIP_US and ITS_GeopIP_USr.
List Action = Alias Native.
That creates an alias under Firewall/Aliases/URLs. Use that to create an allow rule for the US, or in your case Mexico. Disable the allow rule when you return.
It has been a while but you may need to manually run Update in pfBlocker to get it to generate the file for this alias, or wait until the update process next runs. -
@chudak said in What is the proper way to allow Geo access to specific country?:
However, in case you need to connect to your pfSense router via OpenVPN you would need to have another VPN (not using OpenVPN UI) in order to connect to the US first. And usually in the 3d countries Internet speeds maybe low and it maybe difficult.
Why? Why would I need to connect to the US first and THEN connect to the pfSense box? That is exactly the question I was asking because it makes absolutely no sense for me. VPNs and in this case OpenVPN as road warrior VPN solution is secure enough so you open up that port to "the world/internet" and be done with it. I see no sense whatsoever in geo-blocking anything from outside the US and open up ports only to US only IPs if you are actually talking about going abroad and then have problems accessing. If you stay in the US and won't ever go anywhere else - fine, block all but US IPs but I see no actual security gain in doing so, especially if you use OpenVPN with two factors (user/pass + cert etc. or even adding OTP to it).
List Action = Alias Native.
depending on the pfBNG version (-devel or not) I'd use "Alias Allow" but otherwise, @teamits is right in how to get the GeoIPs as Alias for your own rule to use.But as explained above, I see no sense in that.
Cheers
-
Isn't it basis pfSense concept ? => Have all traffic blocked unless something needs to be specifically open?
Interesting!
I do personally open ports and work around geo-blocking.
Thx
YuriW -
It's not just a pfsense thing, but security 101 practice of least privilege.
Sure if you could lock down to specific source IP sure.. But you have no idea where your going to be right... Why are you making it more difficult for yourself.. If you know your going to be traveling..
If your really paranoid you could lock down your vpn access to only the countries your going to be in.. But what happens when whatever network your connected to while traveling has their geoip stuff messed up in the databases.. And now you can not vpn in?
Openvpn when correctly configured is more than secure enough to just leave it open to the world.. I don't even travel and have mine wide open. Just not worth the hassle to lock it down to source IP for my use..
You never know where there is going to be mixup in the geoip stuff... Shoot one our IP blocks out of parent /16 was being listed as being in Vietnam for gosh sakes... I tried for months to get it fixed - and to be honest still think its wrong... But since we shutdown that connection anyway not worth messing with any more.. I submitted the correct to maxmind multiple times - and they only update it like the 2nd tuesday of the month.. So by time you didn't notice it didn't update, now you have to wait another month after submitting to see if corrected..
-
@chudak said in What is the proper way to allow Geo access to specific country?:
Isn't it basis pfSense concept ? => Have all traffic blocked unless something needs to be specifically open?
Interesting!
I do personally open ports and work around geo-blocking.No it's a basic firewall principle to start with "block all" and work yourself up. So do it: you're saying you're going to travel and have to access the firewall/your home network from abroad/external sources. Then open exactly the minimum: a VPN port for you to securely(!) connect to your FW or LAN. End of story. Nothing insecure nor open more than it needs to be.
Otherwise what @johnpoz said.
-
That's what I do :)
The goal for initial questions was to learn how-tos , but general discussion about how users use home network is very useful !
Thank you all!