I need to setup squid3 proxy server on my linux machine with 2 ethernet ports(eth0 and eth1). eth0 has an IP address of 192.168.1.2 assigned by a router which provides internet to the system. eth1 is connected to a switch. I need squid3 to serve the switch through eth1. How should I configure eth1? I don't need the configurations for squid3. What should I do?
Setup squid3 proxy server on linux server with 2 ethernet ports
ethernetsquid
Related Topic
- Iptables – How To Route All HTTP Traffic from eth1 to the Squid Proxy? The Iptable rules
- What’s the minimum required Squid config to make a public proxy server
- Linux – Why Linux continues to use disconnected ethernet interfaces
- linux routing linux-networking ethernet raspbian – How to Get Multiple Ethernet Ports Working on Linux
Best Answer
If you don't need a transparent proxy, then you don't need to bother giving eth1 an address. All the traffic can be handled by eth0.
If you do need a transparent proxy, you have two options here.
Option 1: Bridge it
Configure both Ethernet faces into a bridge group, and then use iptables to handle the intercept. You assign the virtual bridge interface an IP address.
Option 2: Route it
Configure your Squid server as a router. Install dhcp on it to ensure the rest of your network can get addresses. Then use iptables to handle the intercept.