squid proxy: one NIC for inbound & one NIC for outbound?

I am new in squid proxy.

My question is how to (and if it's necessary) to set one NIC for inbound traffic (http requests) and one NIC for outbound traffic (http answers)?

Thank you in advance!

You can't tell squid which network card to use. You tell it what IP addresses to listen on.

Configure your squid proxy to listen on one IP address, and configure the interface you want squid to listen on to that IP address.

If your server connects to the internet through the other interface, routing tables will do the rest.

1 Like

NIC = IP.. It's the same thing. I understand this.

My major concerns are how to configure squid to receive http requests from one IP, and send http answers to another IP? Is this a good practice to manage squid traffics?

Not quite, since you can have more than one IP on a network card or vice versa(bridging arrangements).

how to configure squid to listen on an IP is easy. See the http_port setting.

squid doesn't control and can't control how outgoing connections are routed, though. That's what the routing table is for. Whatever IP address you use as your gateway, is what any outgoing internet traffic -- squid or otherwise -- is going to try to use to connect through.

Yes, you often see squid used in two-nic arrangements.

1 Like

Thanks a lot for your explain :).

Now I need to spend some time to study it and will ask more questions if any later on.