# squid transparent proxy in bridge environment



## kunobang (Jan 4, 2017)

Hi,

I am trying to configure a freeBSD bridge between two network segment inside and outside. When inside users will go to internet they will transparently redirected to squid server configured on same machine. I am trying to achieve this using ipfw. I am trying for last few days but not working. So my question is, is it possible at all? If possible, then can anyone share his experience please.

Regards,
Kunobang


----------



## SirDice (Jan 4, 2017)

It should be possible but to be honest I never bothered. It's too finicky to set up, a plain Squid is a lot easier to get up and running. You also don't want to bridge(4) your internal and external networks. A bridge is a layer 2 connection, effectively making them one big network. 

I would suggest just setting up the firewall to block any and all clients from accessing the internet. That basically forces everyone to use the proxy if they want to browse the internet. So even if they manage to change the settings they still can't access anything.


----------



## kunobang (Jan 4, 2017)

Thank you, SirDice. Actually, my internal network is now connected to ASA firewall. My plan is to put a freeBSD squid box between this link. If I can make this a bridge also, then I don't need to change my IP plan at all.


----------



## SirDice (Jan 4, 2017)

Put the FreeBSD Squid in a DMZ on the ASA. Allow access from the LAN to Squid and block all (direct) access from LAN to the internet.


----------



## kunobang (Jan 4, 2017)

Yes that can be a solution. But I really want to know if the setup is possible or not 'cuz I have tried to build that bridge for days with no luck. If anyone has experience of blinding that sort of solution, I really want to know.


----------



## SirDice (Jan 4, 2017)

Like I said, setting it up is finicky. You can spend weeks trying to get it to work or use a tried and tested setup and have it working within a day.


----------

