2

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?

3 Answers 3

1

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.

1

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.

1

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.

1
  • +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, 2010 at 9:22

You must log in to answer this question.

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