DEV Community

Discussion on: Use mitmproxy as a personal firewall

Collapse
 
aashishrbhandari profile image
Ashish R Bhandari

Hiie Alain,
Great, Your Article is Simple, Sweet, easy to read an understand and to point.

I totally love the mitmproxy and any other solution that provides such filtering

But we can use DNS Filtering as this requires minimal setup, Few Personal View Points:

  • There is a Simpler Way to Block Domains (Via DNS) Removing the Burden of SSL Decryption Load, Certificate Installation on Browser , Configuring Proxy Setting. You can Use DNS Based Filtering (which is used by Many Enterprise as DNS Security Solution, many Home or Small Office Network as Network-Wide Ad Blocker etc many names.)

Yes There are Few Disadvantages to this Approach

IP Based Connection will not be filtered since they will never query the DNS and therefore no filtering will be done. But There are situations when a Reverse Lookup is Done for the IP before Connecting, But Still (But we might not get the same DNS name as expected or we might not get any name in result, because there should be a PTR Record added. [Sorry Too Much Off Topic] )

Below are some Free & Open Source Solutions for This.

Dns Security Solution Doc Links
Pi-Hole github.com/pi-hole/pi-hole/#one-st...
AdGuard Home (DNS) adguard.com/en/adguard-home/overvi...
AdGuard Docs adguard.com/en/blog/in-depth-revie...
DilaDele DnsSafety github.com/diladele/dnssafety

Setting the DNS Server IP as the System DNS Servers and then the Filtering Starts.
Enjoy!!!!!!

They all have a dashboard, you can then add all your Regex over there and things should work awesome.

Collapse
 
dandyvica profile image
Dandy Vica

Hi Ashish,

Thanks for your comment. Yes I tried Pihole with a spare Raspberry PI, it worked great.