title: How to configure multiple NIC cards on ubuntu server 14.04 LTS and connect to router?
body: <p>I have an HP hard Server on which I installed Ubuntu server 14.04 LTS. The server has two ethernet cards.
  I installed Squid proxy server and I am using iptables as a firewall on my ubuntu server.
  Now I want to place my Server between the router and the switch. This is because I want everyone to go through the proxy server to filter some web sites.</p>
  <p>I am facing some difficulties in the configuration of the two NIC cards on the ubuntu server.
  It has two interfaces em1 and em2 to which I want to assign static IP addressses. This is what I have configured so far:</p>
  <h2>The primary network interface</h2>
  <pre><code>auto em1
  iface em1 inet static
  address 192.168.1.30
  netmask 255.255.255.0
  gateway 192.168.1.2
  network 192.168.1.0
  broadcast 192.168.1.255
  </code></pre>
  <h2>The secondary network interface</h2>
  <pre><code>auto em2
  iface em2 inet static
  address 192.168.1.31
  netmask 255.255.255.0
  network 192.168.1.0
  broadcast 192.168.1.255
  </code></pre>
  <p>I read some posts that said there shouldn't be a gateway entry in the second interface so the OS knows which interface to use.</p>
  <p>My current network architecture is the following:</p>
  <p>FSI --&gt; my CISCO Router (192.168.1.1) --&gt; my Ubuntu server (containing two NIC cards and running squid proxy and iptables firewall) --&gt; my switch --&gt; some laptops</p>
  <p>The problem is laptops are unable to connect to the internet. I don't understand why. I disabled the firewall and the proxy but I still cannot connect.</p>
  <p>Should I configure some routing rules between the two NIC cards or should I use the FORWARD chain of iptables? How can I solve this?</p>
  <p>Thank you for any help.</p>