wireguard disallow a lot of geo subnets

4 months ago by erin (she/it, kitty meowww meoww) to c/networking

i have a ton of all russian subnets which i doesnt want route through vpn due vpn monitoring on rzzian faschist services, and services which blocking all non-rzzian ips

also since i wanna use wireguard(amneziawg obsurfication fork, since plain wg is blocked) on a openwrt system soooo maybe there are way to route all traffic thru wg interface but subnet list thru plain interface

aaaaaaaaa i dont have much openwrt stuff knowledge,

okwhateverdude 3 points 4 months ago

This is doable, just tedious by hand. Your favorite clanker can walk you through the steps to find a geoip datasource (eg. bootleg maxmind, ASN lists, etc), and either directly write the routes, or a script that will generate it from that source.

path: 0 24458507, hotness: undefined, score: 3, children: 1
erinmeow 2 points 4 months ago path: 0 24458507 24459549, hotness: undefined, score: 2, children: 0
stratself 2 points 4 months ago

You're probably interested in creating a firewall on openwrt that blocks all traffic from/to certain IPs

path: 0 24458736, hotness: undefined, score: 2, children: 2
erinmeow 1 point 4 months ago

as i understand i can do by one subnet separatly but the problem that there are 1000+ subnets, maybe i dont know some feature to load an ipset file also uguguhguhg isnt parsing 1000+ subnets are load on cpu?

path: 0 24458736 24459461, hotness: undefined, score: 1, children: 1
SteveTech 2 points 4 months ago

I'm not sure how a firewall would help, you'd definately want to do this from the routing table.

isnt parsing 1000+ subnets are load on cpu?

IPv4 addresses are basically just 32bit numbers, any somewhat modern CPU can check through 1000 routes in nanoseconds.

Also 1000+ seems a bit excessive, you should be able to aggregate some of those subnets into a few bigger ones. There are calculators online for this, or you can script it.

path: 0 24458736 24459461 24460162, hotness: undefined, score: 2, children: 0
networking
networking

@sh.itjust.works

login for more options
3664
198
15

Community for discussing enterprise networks and the ensuing chaos that comes after inheriting or building one.

go to feed...