Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an internal network (192.168.2.0/24) that I'm supposed to connect to a proxy.

I've already installed and test(with a little traffic) an Squid 3 cache/proxy server in a Ubuntu 12.04 box with this IP address: 192.168.2.102 eth0. Also, I have another physical NIC with IP 192.168.2.101 eth1.

The setup that I've done consists in the Ubuntu box going out to internet and serving the Squid in the same eth0 NIC.

I have the concern when the all traffic come, this lonely NIC can't handle it.

So I want to setup the eth1 to go out to the internet and the other one to serve the proxy.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This question sounds a little confused, but I think you're asking for one interface to be used for external connectivity and the other interface to be dedicated to traffic for the squid clients. If so:

Make eth1 your default route (you didn't specify but this has a gateway that can route to/from the internet, right?)

ip route add default via 192.168.2.101

Then it's just a matter of having squid clients connect to eth0's address and use source based routing to ensure that responses to traffic coming in on eth0 (i.e. squid client traffic) also go out on eth0.

echo 1 squid >> /etc/iproute2/rt_tables
ip route add default 192.168.2.102 table squid
ip rule add from 192.168.2.102 lookup squid
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.