Super User is a question and answer site for computer enthusiasts and power users. 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 need to setup Ubuntu as home router and external ftp server:

  1. It should provide internet connection to 2-3 PC's in the LAN
  2. Should have NAT, so I can run SIP phones in the LAN communicating to external server(Full cone NAT)
  3. Firewall which says deny all unless explicitly allowed.
  4. FTP server which will be sharing NTFS partition data and which supports Unicode conversion(I guess ProFTPD should do the job).

So is there any resource covering all or each aspect mentioned above to setup this in quick way?

share|improve this question
up vote 1 down vote accepted

For requirements 2. you need to use port forwarding on the router for the RTP port range. This can be achieved with iptables easily.

3: Do you really want this for all traffic or for outgoing only? iptables can be set to a default policy of deny, so it's easy to achieve. Usually you will set another rule to allow all outgoing traffic and all "related" incoming traffic.

1: Enable NAT (iptables' masquerading) and install dnsmasq as dns resolver and dhcp server. Setting up dnsmasq is very simple:

My /etc/dnsmasq.conf looks like this:


This offers a full dns server for the local host names (read from /etc/hosts and /etc/ethers) and a dhcp server (if MAC is found in /etc/ethers, it assigns the stored hostname/ip).

For the internet connection, Ubuntu offers setup wizards, e.g. ppoeconf for ADSL connection.

share|improve this answer

Take a look here. IT has basics and is a good starting point for more advanced configuration. Feel free to skip some steps, if you don't need them.

In general HowToForge has a lot of nice guides.

share|improve this answer

I know, this probably knocks you off a bit, but don't use Linux as router.

Use OpenBSD and the Firewall/NAT/Packet Filer pf.

You'll safe yourself a lot of trouble.

I've got this setup running for a few years now, and I'm absolutely happy with what I have here.

share|improve this answer
+1: OpenBSD and it's pf is way better than anything else I have seen yet. Unfortunately the last time I used it, was 2006 :( Now I have a combined Media Center / Home router and thus must run a Linux (Ubuntu NBR) on it. Ubuntu's "ufw" has a similar syntax as pf, but is lacking almost all nice features and still almost unusable after years of development. – IanH Aug 19 '10 at 9:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .