Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm helping a friend to set up a media server for his new house. I've installed Debian 7.2.0 and I'm trying to get the network up and running.

The physical set-up is like this:

         Other wireless devices 
                   |                        Server:
Internet <---> Wireless Router <---------> eth0 (built-in motherboard)
                                   UTP     eth1 (extra card) <-----> PC conn. to TV

I would like the server to have a static IP address so it can easily be found. Furthermore, the server should share it's internet connection to the PC connected to the TV (running Windows 8).

I got it working yesterday using one of the built-in GUI configuration tools. However it stopped working today (possibly due to a restart or plugging in/out the cables) after moving the server to the attic.

I've read and tried a lot of tutorials, but get stuck because I do not understand them or because they are meant for different distributions.

What steps should I take to:

  • Reset or get rid of any settings I made in the GUI/iptables/etc.?
  • Give the server a static IP?
  • And make it share it's internet connection to the PC on eth1?
  • Make it all permanent?
share|improve this question
Beside the software solution (which is of course a good way to learn more about networking in Debian/Linux), you can also use an extra small network switch - just to mention it. – jofel Jan 4 '14 at 19:21
up vote 1 down vote accepted

Start by apt-get uninstall networkmanager on the server. Possibly you need to install the bridge-utils package, but I am not sure if it is needed (can't hurt).

Then set up bridging to make the two network server interfaces act like one (and forward everything), by editing the /etc/network/interfaces file (assuming your wireless router's IP is

auto br0
iface br0 inet static
  bridge_ports eth0 eth1

Now that the server isn't using DHCP to get network information, you need to configure the nameserver manually in the /etc/resolv.conf file:


The "PC conn. to TV" should then be able to get an IP address via DHCP from your router.

(You can tweak the setup on the server to use DHCP too, if you configure the wireless router to always give your server's MAC address the same IP address. Then the nameserver will also be configured automatically via DHCP.)

share|improve this answer

As Debian documentation states, you should use legacy configuration method, i.e. /etc/network/interfaces.

To do this you'll first need to disable NetworkManager.

You can bridge both interfaces to share Internet connection.

share|improve this answer

Your Answer


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.