How do I configure two network adapters in Ubuntu Server

July 6, 2021 . 1 MIN READ

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 didn’t 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 :

  # The loopback network interface
  auto lo eth1 etho
  iface lol inet loopback

  # The Primary network interface
  iface eth1 inet static
           address 192.168.0.3
           netmask 255.255.255.0
           network 192.168.0.0
           gateway 192.168.0.1
           dns-nameservers xx.xx.xx.xx xx.xx.xx.xx

  iface eth0 inet static
           address 192.168.0.4
           netmask 255.255.255.0
           broadcast 255.255.255.255 
           network 192.168.0.0

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.

Thanks!

 

http://askubuntu.com/questions/76065/how-do-i-configure-two-network-adapters-in-ubuntu-server

Leave a Reply

Your email address will not be published. Required fields are marked *