News for hackers. Stuff that matters.
Re:Start Self Hosting by rsync on Wednesday March 23, 2022 @03:19PM (#30782207)
"Flip the wrong switch and you expose something to the world."

One strategy for dealing with accidental misconfigurations is to employ a "network slug"[1]:

"A Network Slug, or "Slug", is a transparent layer 2 firewall running on a device with only two interfaces. ... The purpose of a Slug is to reinforce a security policy or to block uninentional leaks of information."

[1] https://john.kozubik.com/pub/NetworkSlug/tip.html

Re:Start Self Hosting by hosteur on Wednesday March 23, 2022 @06:07PM (#30784123)
I have never head this idea described in text before. However, I have made firewalls this way for decades. They were typically for stuff that ran in a datacenter so it would be a 1U server with three NICs.

I would really like to make such devices for home or office use. What would be a good device to use for this? Unfortunately, RaspberryPIs do not come with 2 or 3 NICs. Any recommended alternatives?

Re:Start Self Hosting by rashkov on Wednesday March 23, 2022 @08:10PM (#30785136)
I would have a look at the openwrt project’s database of supported devices. You can filter for devices with 3 nics (though not sure it supports filtering for “3 or more”).

https://openwrt.org/toh/views/toh_available_16128

Re:Start Self Hosting by wallacoloo on Thursday March 24, 2022 @07:39AM (#30788490)
use VMs. qemu/kvm. the Tor-based Whonix OS takes the approach of one VM running a Tor proxy and another VM running your application software. the latter VM only has access to that proxy, and no other network interface. it’s effectively the same approach as i understand a slug to be, but with the hardware virtualized instead of physical (or course you don’t have to use Tor — you can define whatever interface you want: a VPN, a firewall, etc).
Re:Start Self Hosting by rsync on Wednesday March 23, 2022 @11:09PM (#30786031)
I am using these:

https://www.seeedstudio.com/Rapberry-Pi-CM4-Dual-GbE-Carrier...

... to make firewalls and bridges with rpi cm4 ...

Re:Start Self Hosting by egberts1 on Wednesday March 23, 2022 @03:37PM (#30782376)
Got one of those. It is hard. Very hard. Absolutely freakin’ hard to make a bump-in-the wire dynamic 5-tuple blocking “hub”.

It also does “waterfall” egress packet delaying.

Re:Start Self Hosting by rsync on Wednesday March 23, 2022 @03:44PM (#30782468)
I'm not sure I understand what you're describing ...

A slug should not need to be dynamic nor should it be complicated in any way ... in fact, it is one of the simpler systems I have ever deployed ...

Re:Start Self Hosting by egberts1 on Wednesday March 23, 2022 @04:33PM (#30782972)
Does it do Suricata, Zeek, Snort, Transparent Squid (with valid signed CA cert), and a furtive SSH port in which to monitor and API to block ports?
Re:Start Self Hosting by hosteur on Wednesday March 23, 2022 @06:04PM (#30784087)
I think all those are anti-features on a network slug. As I understand it, the device is intentionally simple because it is there to ensure some misconfiguration cannot expose some port that should not be exposed.

I have implemented firewalls similar to this in the past. They typically had three network interfaces. Two of them were configured as bridges and then I use ebtables/iptables to filter traffic flowing through. These two interfaces would have no IP address and would not be visible on a traceroute, etc.

The third interface would only be connected to a separate admin network. Or it might not even be plugged in. In the latter case, the admin needing to change anything on the device would have to be physically present and bring a "crossover" ethernet cable and plug their laptop directly into the third NIC of the firewall. From there, they would be able to ssh into the firewall and change config.

Re:Start Self Hosting by rsync on Wednesday March 23, 2022 @06:05PM (#30784097)
A network slug does not have an IP address. You cannot connect to it over the network. I'm not sure you understand what the device is and what it does.

Let me give you an example - I have a "port 22 slug" and what it does is block all traffic of all kinds except for TCP22. That's it. It does nothing else and it does it transparently without having an IP address of its own. If I wanted to reconfigure it, I would connect with a serial console.

Make sense ?

Re:Start Self Hosting by egberts1 on Wednesday March 23, 2022 @07:14PM (#30784773)
Yep. That’s why a lone but shadow port is taken from the high-end of ports … just for SSH (on the inside). Two interfaces. No bridge. Raw Netdev.

Almost like an overglorified but managed hub.

If you like your MAC, you get to keep your MAC.