Hacker News new | past | comments | ask | show | jobs | submit login

I'm working on a network-level AdBlocker project functionally similar to Privoxy which requires 2 Ethernet ports. One connecting to the modem and the other connecting to the router so that it's possible to MITM the traffic, but I don't see any boards with 2 Ethernet ports. Should I:

- buy 2 ESP32s with an Ethernet port on each and communicate between them over serial

- buy an ESP32 with Ethernet and USB and use an Ethernet to USB adapter

- or is there a better option?




I don’t think it will be good option. I think RPi is better for your usecase.

I believe pihole works with just 1 eth port as you are just using it for dns queries and not actually NAT’ing traffic through it.


Yeah, I know a lot about PiHole and how it works, but I'm creating a MITM AdBlocker like Privoxy. For that, I need 2 Ethernet ports. Raspberry Pis also cost a ton right now because they have been heavily affected by the silicon shortage. Also, I want to develop for a platform which is cheaper than the Raspberry Pi at MSRP.


It should be possible to do that using one Ethernet port using VLANs. You could buy a cheap L2 managed switch and use it to trunk two different Ethernet networks on the same port. Then you would configure the Linux networking stack to split the VLANs into separate interfaces.

I am by no means a networking expert and was able to use technique to work around a similar issue in the past. It was easier than I expected!


Awesome, I didn't know this was an option! Is there a cheap L2 managed switch? I'm only seeing $100+ boards with a cursory search


try ebay or newegg to get used or refurb ones. a lot of switches last really long.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: