Closed GWustenstein closed 1 year ago
Mmm, for a scenario like that I would probably be reaching for a small switch and an external wifi router with a firewall (e.g. something like an Ubiquiti or https://teklager.se + pfSense) - but it does add significantly to the cost.
I'll look into it - it's probably immaterial, but which particular RaspberryPi model are you using?
The principal issue with using a switch: If you put the access controller on the same subnet as the wifi, you now have unsecured udp flying around the ethers. Gain access to the wifi from the comfort of a car outside and you pretty much have assume physical entry is possible from there.
In this case mentioned in OP, a 4b has a gig-e on one end and a wifi. But any pi with a spare usb can be outfitted with a wifi dongle to accomplish a similar task. Bind the -out to eth0 and lock down wlan0 to tls and ssh/vnc with lengthy keys and your remaining worries are mostly physical security and not being lazy with updates or the keys.
Hi,
Does this still need looking into or was it an artifact of the Debian Bulleye upgrade?
Closing this - seems like more of a Raspberry Pi system issue. Feel free to reopen if necessary
Agreed, I have yet to getting around to writing a recipe for setting up the router config in a way to configure an interface as a specific UDP tunnel destination. Though I completely hate the idea of unprotected UDP flying around the network, it will have to do for now. The end goal is to have a pi or similar dual ethernet device located inside the locked box with the access controller, configured as a secure tunnel; Only big-key encrypted traffic runs external to/from the box.
Actually I'm going to reopen this because it looks interesting!
Turns out there's a SO_BINDTODEVICE
socket option (Linux only) which lets you bind to a specific interface. Wasn't aware of it and it's not cross platform but for most part anything running tunnel in this mode will be running on Linux anyway.
If you want to do it without waiting for my fix, there are also ways to do it using just the system:
Working notes:
That would be great...depending on the widget, one could specify it on the command line or config, so a zero-w (if you can get them) plus a cruddy micro to ethernet adapter would do the trick for the better part of $30/US
Could probably do it even less expensively using a PicoW and some not-too-complicated C code! Hmmm .. thinks .. :-)
Tasks:
bind-to-device
for TCP client/server
bind-to-device
for TLS client/server
bind-to-device
for UDP listen/broadcast
help()
usage()
Well, an ESP32 could do it as well, and you could go so far as to bit-bang manchester at 10mbps with the $2 kits if you really wanted and a hacked 10bT i/f built with resistors and spare i/o pins, but just imagine trying to load in a set of keys, let alone debug DNS on it...
And that's a wrap! The bind-to-device functionality is available in the master
branch if you need it before the next release which is a fair bit down the line. Have tested it on a Macbook, Rasberry Pi 3B+ and Ubuntu and seems to work as expected.
Will leave this open for another couple of days to give it time to bed down.
Closing - seems to be stable and do what it is supposed to do. Feel free to reopen if needed.
Posting this as a separate issue as a placeholder to document and resolve configuration related matters...
Problem statement: In the following use case, an access controller is placed in a difficult to reach location, it may be easier to get power to the location than it is to run physical ethernet to it, for example an outbuilding, electric gate, etc. One could simply employ a wireless bridge to the site, however such devices are subject to well-known exploits and port 60000 is wide open for the controllers.
Solution: Instead, a Raspberry Pi (or equiv.) is applied as the tunnel endpoint co-located to the controller with the physical ethernet connected to the controller (--out udp/broadcast), and the wifi interface acting as a secure WAN (ideally as --in tls/client with client certs listed with the server's CA)
Issues: