Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers 3

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:

resolv-file=/etc/ppp/resolv.conf
dhcp-range=192.168.133.70,192.168.133.79,12h
read-ethers

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.