Server Fault is a question and answer site for system and network administrators. 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

Here's my current /etc/network/interfaces file on the "server":

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    name Wired Network

auto ath0
iface ath0 inet static
    name Wireless Network
    wireless-channel 1
    wireless-essid MYNETWORKNAME
    madwifi-base wifi0
    madwifi-mode Master

eth0 (wired connection) works fine on the server, I can ping for example. /etc/resolv.conf has the correct nameservers.

ath0 (wireless connection) also works fine, clients can connect to the server via ssh, for example: root@

Currently clients are configured:


  • Static IP: 10.1.1.[2-254]

  • Subnet:

What I want now is for clients to connect to MYNETWORKNAME and have internet access.

I load the interfaces file with: /etc/init.d/networking [restart|start|stop] (no network-manager, wicd etc.)

Thanks! (:

share|improve this question
up vote 4 down vote accepted

You can run a NAT/Firewall software like Firestarter on the server.

Another solution without running anything is to do the NAT manually with iptables on NAT Table postrouting using Masquerade on your output external interface (eth0). See rule below:


and you will need to enable ip forwarding with:

/bin/echo 1 > /proc/sys/net/ipv4/ip_forward
share|improve this answer

Routing is available in Debian, but disabled by default.

Run the following command:

cat /proc/sys/net/ipv4/ip_forward

If it comes back as "0", then run this next command to set it to 1:

echo 1 > /proc/sys/net/ipv4/ip_forward

If it works after that, make it permanent by adding the following line to /etc/sysctl.conf:

net.ipv4.ip_forward = 1
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.