this post was submitted on 17 Nov 2023
3 points (100.0% liked)

Home Networking

189 readers
1 users here now

A community to help people learn, install, set up or troubleshoot their home network equipment and solutions.

Rules

founded 10 months ago
MODERATORS
 

I'm just curious, what if I'd use my pi-hole to block all connections from/to China on my home network. I have a good bit of automation in place, but mostly western solutions, yet still I wouldn't be surprised if they called China. Have any of you tried this kind of experiment? Is it even possible to block? What gone down?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 10 months ago

Geoblocking is a pretty common practice in enterprise networking.

[–] [email protected] 3 points 10 months ago (3 children)

I block all inbound connections from China and Russia via GeoIP blocking in Opnsense and no one in my household has ever complained. Considering setting it up to blocking outgoing as well, but any Chinese device I'm suspicious of is already isolated from the WAN.

[–] [email protected] 1 points 10 months ago

good to know this is an innate feature of opnsense

[–] [email protected] 1 points 10 months ago

What's more suspicious than Alexa or our phones? The "bad guys' can do jack shit with our data but the "good guys" can fuck us up.

load more comments (1 replies)
[–] [email protected] 2 points 10 months ago

I do this, the only problematic thing is the NTP request from my Philips Hue bridge.

[–] [email protected] 2 points 10 months ago

It’s a common feature in a lot of threat management software / firewall systems. Ubiquiti and pfSense both offer it off the top of my head. I’ve used both with no noticeable issues on smart / IOT devices.

[–] [email protected] 1 points 10 months ago

I have denied all then only white listed US, US outlying areas, and Canada. I don’t do business outside those. This is at the firewall/IP level. Blocking outgoing DNS would probably only affect maybe Alibaba. TikTok for instance runs domestic servers so you have to explicitly block Bytedance.

The number of random attacks per day from China, Russia, and Singapore is hundreds. That’s what firewalls are for.

[–] [email protected] 1 points 10 months ago

I block a handful of countries I just have no business interacting with. In and out. Doesn’t cause any problems. But you know Microsoft and Amazon aren’t checking ID before letting anyone put a server in one of their DCs? TikTok is all hosted on US servers but that doesn’t mean there isn’t a back door or a copy job sending the data off shore. So I go the extra distance to block a huge list of domestic and safe country international domains that I don’t want traffic going to or from.

[–] [email protected] 1 points 10 months ago

This is only going to do so much. If a connection is trully malicious, it’ll probably route through a domestic or EU IP (azure, digital ocean, linode, aws, hetzner, etc)

That said it would be interesting to monitor and see who all your devices are talking too

[–] [email protected] 1 points 10 months ago

It don't matter a whole lot, either they are using some cloud computing platform that is us based, or a VPN to bypass your restrictions.

Someone will always be scanning your network, looking for targets. Don't be surprised.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

Why not track how many network calls to and from IP addresses you can geolocate to China you actually see before doing anything? Geolocation using IP is far from perfect

[–] [email protected] 1 points 10 months ago (1 children)

Just put it on a seperate network, with no internet connection. Use a server as a passthrough, so you have control. Stay away from anythibg cloud based. Pretty easy stuff honestly.

[–] [email protected] 1 points 10 months ago

I hadn’t thought of your concept. Thank you. I’ll go research it now

[–] [email protected] 1 points 10 months ago (1 children)

Wouldn’t they just exploit VPN strategy to get around these possible blocks? I assume they also assume these things and establish workarounds.

[–] [email protected] 1 points 10 months ago

Most just rent US servers these days.

[–] [email protected] 1 points 10 months ago

I use pfsense which has geoip blocking, however this is only going to be a threat if you have open ports, most if not all firewalls are default deny, so what I do is only allow North America and South America (family there).

I might suggest just looking at crowdsec.

[–] [email protected] 1 points 10 months ago

I block all RU and CN ip addresses. No ill consequences.

[–] [email protected] 1 points 10 months ago

I created a rule on my untangle to block all “axis of evil” countries.

Works great.

Keep an eye on IOT devices miss-behaving once blocked from calling home

[–] [email protected] 1 points 10 months ago

go for it. we block everything except for US.

[–] [email protected] 1 points 10 months ago

Not much, I currently block all connections in/out of China and Russia. Most popular services have localized servers in your region.

[–] [email protected] 1 points 10 months ago

The inbound connections will revert to bots in your region.

[–] [email protected] 1 points 10 months ago

I don't bother with blocking individual countries. Sure I could just block the whole 210.0.0.0/6 but with ipv6 it becomes untenable and not to mention that once a bad actor successfully attacks someone in your home country, then they can use that machine as a springboard to attack you - and how can you discern the difference anymore?

Just need to do the best I can to ensure people don't get in the usual ways...

[–] [email protected] 1 points 10 months ago

It won't do much in the sense that most stuff will keep working but also in the sense that it won't protect you from hackers coming from those countries.

So yes, you can do it, but don't let that give you a false sense of security!

[–] [email protected] 1 points 10 months ago

They will just use IP addresses from friendly countries by means of VPN.

[–] [email protected] 1 points 10 months ago

Pretty sure you can block all the Chinese IPs and still disclose information to China. Discord for example is a massive business which China had heavily invested in. Part of their constitution is Chinese owned companies must disclose information.

https://www.vintageisthenewold.com/game-pedia/is-discord-owned-by-tencent#:~:text=Tencent%2C%20the%20owner%20of%20Discord,and%20retain%20personal%20information%20indefinitely.

[–] [email protected] 1 points 10 months ago

I block the entire cn TLD (and the RU, PK, Top, biz, info, and IN TLDs) and haven't had any issues.

I also go a step further and block all IPs in those geolocations in my Router.

[–] [email protected] 1 points 10 months ago

All you'll do is put a very small impediment in the path of the noobiest of script kiddies.

Absolutely anyone who is capable of working a web browser can easily use a VPN or compromised system to get around your IP address block.

[–] [email protected] 1 points 10 months ago

At the firewall level I do block outbound to suspect nations, and inbound from all foreign nations. No ill effects that I've noted, but I'm also pretty particular about not getting "smart" or "connected" devices with the weird name brands off Amazon.

If it's a folding picnic table, sure I'm good with FooJoy, but anything that connects to a computer or the network, I stick with reputable brands.

[–] [email protected] 1 points 10 months ago

I've done it with my Unifi Dream Machine. I haven't noticed any issues.

[–] [email protected] 1 points 10 months ago

block the NSA too

[–] [email protected] 1 points 10 months ago

It would be a good idea

[–] [email protected] 1 points 10 months ago

Pihole only does domain blocking. Let’s say spookydomain[.]cn resolves to 1.2.3.4. You could block spookydomain[.]cn through pihole but nothing would stop a computer from directly interacting via IP address or from the Chinese to buy spookydomain[.]org and evade the block. To do a true country block, you’d need to do it at the firewall and have up to date geoip data.

[–] [email protected] 1 points 10 months ago

It's a sophistry to geoblock China on security grounds and recommend and upvotes that advice, but then recommend Chinese hardware like TP Link Omada for the bedrock hardware for your home network. Yet I see TP Link Deco and Omada recommended on here every day, and upvoted into positive numbers too.

How could you possibly trust that geoblocking on Chinese hardware even works on their hardware? They get firmware updates from servers hosted in the USA, which in turn get firmware images from China. Obviously TP Link servers in the U.S. don't block China. So how effective is geoblocking if you went ahead and bought your hardware from a Chinese controlled company to save $100?

Same goes for Chinese security cameras. Everyone talks about using VLANs to isolate them, so their being compromised will not "spread" to the rest of your network. But if a compromised Chinese camera has the ability to crack the "root" account on Linux, Android, and IOS, and the "Administrator" account on Windows if left on the same VLAN, then why would it have any difficulty at all cracking the "admin" account on your router, rendering VLAN separation useless? What makes the router OS so much more resistant to takeover from that compromised IoT device versus other OSes?

It's the logic gymnastics that "security experts" on here must do to justify geoblocking China, but then recommending (or upvoting) TP Link Deco and Omada to save $100 that's hard to take seriously. Are they a threat or not? If so, how can you allow the recommendation of China owned company hardware to users with a straight face? Where is the precaution now?

What about smartphones? Smartphones all have GPS tracking, a camera, a microphone, and an Internet connection that's pretty much always on. They are the ultimate spying device that everyone carries voluntarily, even after experiencing events like talking about a certain product on the phone to your mother, and getting ads for that exact product as embedded ads hours later.

We might trust Alphabet and Apple not to sell our information to China and Russia directly, as they actually want to comply with Western laws. But isn't it also logical to believe that Alphabet and Apple sell personalized ad information to "reputable" buyers, who in turn sell it to a company that is degree less reputable, who in turn sells it to another company that's two degrees less reputable, and so on, until it gets to a seller that doesn't discriminate against any buyers, or are a front for the Chinese and Russian government itself?

They might not even need to buy this information through layers of middle men. TikTok has over 100 Million users in the US, mostly as an App on smartphones. TikTok is a Chinese owned company, and are very much a target for a complete banning by the U.S. government, but not quite there yet for everyone else (maybe due to foreign lobbying efforts?). Even with all these warning signs, 100 Million US users do not care or take it seriously, and film you and your family on their App behind your geoblocking firewall.

What about hostile governments using services that are completely legal in the U.S. directly? The same Intelligence agencies that recommend you geoblock Chinese inbound and outbound traffic have also warned that China and Russia use platforms like Facebook, X / Twitter, Instagram, and even Reddit as giant Propaganda and misinformation machines to influence politics and thinking in the West. Even now, these foreign influences still propagate unchecked, with only token "moderation" attempts to combat it (and how do we know we can trust these moderators?). The EU is currently threatening to de- platform X because of lax moderation efforts, right now, in real time.

So go ahead and geoblock China and the rest of the evil countries if it makes you feel better. But it's as effective as trying to keep your kid from looking at porn by blocking his MAC Address on your home network. There are so many other ways for access that you do not control that your single act of defiance is essentially meaningless in the bigger picture. Your personal information has already been packaged and sold to every available buyer, because we were all asleep at the wheel at the dawn of Social Media and smartphones, and did not control that information at all. Anyone and Everyone with an App or cookies were tracking and packaging you. Only recently have smartphone OSes begun to lock down your personal information, but it's far too little a decade too late.

The toothpaste is out of the tube.

[–] [email protected] 1 points 10 months ago

~~World~~ Wide Web - not so fast!

Is even blocking China going to work? If someone was nefarious and even have way smart wouldn't they go through a proxy in the US or somewhere else deemed safe.

[–] [email protected] 1 points 10 months ago

Then you’d be left will only paper plates and plastic cups…

[–] [email protected] 1 points 10 months ago

I geo-IP block China on my home network. Aside from a couple of sites for my mechanical keyboard hobby/ addiction I haven't noticed any issues. I am located in the US, for reference. YMMV.

[–] [email protected] 1 points 10 months ago

I block most of the world from incoming connections.

Outbound is less restrictive.. But I still block a bunch of countries that are deemed high-risk.

China is def on both lists..

[–] [email protected] 1 points 10 months ago

Our org blocks all traffic except for North America. Haven't ran into issues yet.

[–] [email protected] 1 points 10 months ago

I have all countries blocked with allows before if it needs to get to my country based AWS/Azure routes.

[–] [email protected] 1 points 10 months ago

I block China, Russia, and Iran for Geo IP in my firewalls. Works wonders for threat logging (i.e., drops significantly).

Very much recommend

[–] [email protected] 1 points 10 months ago

you don't do that already? i block the vast majority of the world by default on my udm pro se. It won't fix everything but it will at least thwart those looking for an easy hit.

[–] [email protected] 1 points 10 months ago

I did that, with a few exceptions, and it still works fine.

[–] [email protected] 1 points 10 months ago

China would start using vpn.

[–] [email protected] 1 points 10 months ago

if you scare of Chinese hackers, they are smart enough to know that there is such a thing as a VPN in this world. And pi-hole is just DNS.

[–] [email protected] 1 points 10 months ago

Checkout PFSense and PFBlocker-NG. It's a geofence blocker to DENY all incomming requests from various IP subnets that you select on the public side. If you have any open ports (say for games or otherwise on your home network) this will really cut back on system load/login attempts. It can just drop the packets entirely, not even entertaining them.

You'd ideally want to use a VPN and not expose any other ports on the firewall. For example never open an SSH port. If you do use a keypair and make it a non-standard port. But having a VPN would prevent you from even needing to open SSH ports as the VPN would essentially put you on the LAN. Most consumer routers will let you setup a VPN server for your LAN now.

But something like hosting a webserver at home this (Geoblocking) can really help with. In addition to using cloudflare as your domain registrar for DDOS protection.

Here's a video on it:

https://www.youtube.com/watch?v=oNo77CMoxUM

If you have a consumer firewall you may or may not have access to doing this. (Geoblocking)

With pihole you could create lists of domains (say from certain countries) that you do not want to resolve for name resolution. But it would not stop those countries from attempting to access open ports on your network. I.e. ingress vs egress

By default your home firewall/router, if it is a consumer model, should not have any ports open.

Hope this helps!

[–] [email protected] 1 points 10 months ago

I block almost all Eastern Europe, Russia, the stans, almost all of Africa, Indonesia, China, North Korea and more. No problem. Unifi router allows users to just block by clicking the map.

[–] [email protected] 1 points 10 months ago

Note that GeoIP is unreliable so you may accidentally block some IPs that aren't Chinese. Even whois is not 100% reliable given how often IPv4 addresses are traded these days.

If some Chinese-made technology really phones home, it's more likely that they'd communicate with a US-based server that would then communicate to servers in China behind-the-scenes.

[–] [email protected] 1 points 10 months ago
[–] [email protected] 1 points 10 months ago (1 children)

I block China and Russia on my router and haven’t noticed it one bit. I was most worried about my Tuya lights not working, but even those have been fine.

load more comments (1 replies)
load more comments
view more: next ›