I have two network adapters. How do I setup both adapters in Ubuntu Server for squid?
- Adapter 1 (ip=192.168.2.100 subnet 255.255.255.0 default gateway 192.168.2.1)
- Adapter 2 for my network switch which is connected to my user.
migrated from serverfault.com Nov 6 '11 at 15:10
This question came from our site for professional system and network administrators.
Had a similar issue with 2/two networking devices on Ubuntu 12.04 and apt-get wouldn't resolve any remote host address however, I was able to accept incoming connections. After tons of searching and coming across this post, I had tried the above once before and didnt seem to work.
Not sure if I had made another change since the first time trying to add the gateway option however, after trying to add the gateway option again I was unable to connect to my Webmin interface, which is assigned/bound to (one ip / one interface), however was able to get apt-get update to resolve domains again and ping remote hosts.
To get Webmin accessible again I removed the gateway option from the network card used for the Webmin interface in the /etc/network/interfaces file.
Not sure if I have some other misconfiguration somewhere else that could be causing that to happen, but for now it works and if I find a better solution I will re-post.
My interfaces file :
eth1 is for Apache server and is on-board 10/1000 Mb/s eth0 is an add-in card 10/100 Mb/s for local ssh, webmin, etc...
They appear in that order as well.
That's difficult to read, but I think you asked how to set up two network cards. Here is some help for static addressing. Edit the interfaces file and restart networking. Use your favorite text editor to...
And the contents of the file:
Save and restart networking: