Ask HN: What's a simple setup for creating an offline LAN?
I'm looking to have a LAN that has some storage and IOT devices connected to each other but can't access the internet (or vice versa). Is there a simple way to do this while still having my computer connect to my internet connection?
13 comments
[ 2.0 ms ] story [ 38.7 ms ] threadThe isolated network should have its own root DNS server that returns "no" for all queries outside that LAN: that'll save a lot of time and misery with DNS timeouts.
A dedicated offline switch is so much simpler than VLANs, both to configure, use and understand.
I'd use the same software stack on either a linux machine that's on that LAN, or just use a raspberry pi. I'd basically run the entire network part with dnsmasq.. You don't need anything else for DHCP and DNS. You don't even need to mess with iptables since you don't want packets leaving that LAN.
If you're running the wires (and how many wires are we talking here? 24 or less i bet) ... then the simplicity is worth much more IMO.
[0] https://serverfault.com/questions/218080/is-a-managed-switch...
step 2) sit back while everyone sets it up
step 3(optional)) provide mountain dews baby
step 4) have a lan party
step 5) realize that OP asked about an offline lan, not an office lan.
- 1 connect to internet, with real ip; - 2 connect to first lan, with grey ip numbers (192.168. , 172. ), which have nat; - 3 connect to second lan, other grey ip network, which NOT have nat, and all packets going from it to 0/0 silently dropped by firewall.
All nets use dhcp, and have dns and ntpd for convenience, because it is much easier to change few tables at gateway, than change properties of all devices, when happen some difficulty.
Example of difficulty, I few times had troubles with my home lan, because my provider use grey ips in their network and my home net addresses conflicts with providers. So I changed networks of my home lan for some range which is not used by my provider.
BTW, this is really big trouble for some cheap hardware routers, because they have limited IP functionality, and for example one of my own such device only work with 192.168. grey ip range, they don't added 172. network range.
If your goal is only to prevent them from accessing the internet, the simplest solution is to hardcode the IP addresses on your devices, but leave the gateway settings blank (or use a dummy address if needed)