6

This is my first post at here. I have been using Ubuntu for 3-4 years. However, I have been the only Ubuntu users among my physical circles (I get to know a lot of other users online). Recently, I have been able to convert my girlfriend to use Ubuntu as well and she loves it a lot.

I have been thinking of setting up my own small home office. I would have 2 laptops (1 of mine, 1 of my girlfriend's) and a small server (just converted from a desktop). I also have a wireless router modem which will connect with the laptops through wireless and connect with the server through cable. I am thinking on the best solution to solve this setup.

Basically, what I want to achieve would be:

  • A network which will allow internal file sharing.
  • A server which can be accessed from the Internet (out of my home).

So, any suggestion?

0

4 Answers 4

2

As you have only Linux computers in your internal network (two Ubuntu laptops and a Ubuntu Server), you need not install Samba. Of course, you will need to have a static IP if you want to access your server over the Internet.

  1. Install open-ssh servers on each on the three machines. This will allow you to share files via sshfs. You can use this guide to set it up: https://help.ubuntu.com/community/SSHFS. Make sure that you use different ports for each machine (i.e., do not use the default port). You can use the GUI tool 'Connect to Server...' from the Places Menu and get access to the files on the remote machine(s). edit: I had earlier suggested ftp using TLS, but it takes more steps to set up than sshfs. Thanks to Wolfy for the suggestion.
  2. Install open-ssh server on your Ubuntu server, if you have not done so already. This will allow you to control your server remotely. Again, make sure that you use a different port here, other that the default port. Now, set your router to forward this ssh port number to your server. Now, you can connect to your Ubuntu server using your static IP address and the ssh port number of your server.
  3. In case your office also needs a printer, you can either have a network printer (one that is directly connected to the router) or a shared printer that is connected to your server. Either way, Ubuntu has guides: https://help.ubuntu.com/community/Printers https://help.ubuntu.com/6.06/ubuntu/serverguide/C/cups.html https://help.ubuntu.com/10.04/printing/C/printing.html

Note: I suggest that you use Ubuntu 10.04 Server as it has Long Term Support (LTS - up to 2015). So, once setup, you will not have to touch it till 2015, by which time you should upgrade to Ubuntu 14.04 LTS.

5
  • Ya. I am having 3 Ubuntu installation in my network. And your advise seems to be pretty solid. Thank you.
    – JohanSJA
    Jul 19, 2011 at 5:51
  • 1
    I think that you can even skip the first step and use ssh for create share folders :)
    – Wolfy
    Jul 19, 2011 at 7:17
  • yes, sshfs is an option.
    – rigved
    Jul 19, 2011 at 7:55
  • i have edited the answer to have sshfs as the option to share folders.
    – rigved
    Aug 3, 2011 at 11:24
  • You shouldn't need a static IP address if you use a service like DynDNS. It will actually create an DNS entry for your machine and track it as it changes.
    – jwernerny
    Aug 3, 2011 at 12:21
2

Three ways to do this from where I stand.

  1. Setup the server as the external facing router. Will require two nics, but will give your server external face to the internet. (more complicated, not going to recommend unless you have a specific reason)
  2. Use the DMZ feature of your router to open all ports to the server.
  3. Open each port as required. This is the best option as you won't have to worry too much about securing your server.

Of course, you'd install samba or configure iptables as necessary.

2
  • there is no need of samba, for only linux network... samba is used for windows clients...
    – Wolfy
    Jul 19, 2011 at 7:20
  • While that may be true, I don't think there is any reason to not use samba. It supports things like netbios name resolving. Honestly, I'd installed it in a linux only environment any day. Using ftp as a file share seems less than convenient, in my opinion. Samba has the most compatibility with the most devices.
    – user606723
    Jul 19, 2011 at 13:52
1

I'll tell you my configuration. I think it could be useful to you.
On LAN I have an Ubuntu server, 2 desktops, 2 laptops, 3 virtual machines which are run on the server.
On server I have NFS (network file system) which enables me to share all the data across the machines. That is I have a couple of large hard drives on server machine.
I think that NFS is a better solution than FTP since you can mount folders/drives from server on your local machines, you could also store home directories on server through NFS (but it's slower than if you have home dir locally).
If you need more machines, it's a good idea to create virtual machines through Virtualbox or some other virtualization solution that can run on a server without GUI. I think that Virtualbox is very easy to setup, for example, you could add Windows machine, web server, and some Desktop that would be accessible from remote. You'd have an easy access to all the machines from any other computer in LAN since they can be set as part of LAN.
You could also use server as firewall/gateway to other machines if you connect one NIC to router that gives you public IP, and other NIC to some other router/switch with local IPs. Than you'd need to route traffic to other machines by setting up iptables.
What would even be better as a firewall solution, if you have some low power box, pfsense, you could put pfSense in front of your LAN and you could configure everything through web interface of this powerful firewall.

0
0

There have been a lot of good answers already, but I thought I would add a couple of thoughts more toward securing your setup for external access.

I don't like having any of my machine directly on the external internet. It provides too much exposure to problems, even if they are locked down. That includes most port forwarding.

Instead, I would set up my router to be an OpenVPN server. How you do it depends on your router, but for many of the current ones, there are ports of DD-WRT that have OpenVPN. [I personally like the Tomato port patched for OpenVPN: TomatoVPN, particularly since it has a nice GUI web interface.] Most of these packages also support automatic updates to services like DynDNS so you eliminate the need for a static IP address.

One of the advantage of running a VPN is you get an environment where you are just "extending" your existing network. Unless you have the keys to the VPN, you can't get in. If you do have the keys, it will look just like you are on your home network. Also, if setup correctly on your laptop, you can route all of your IP traffic through your home router, thus significantly reducing the chance of having your communications intercepted on a public WAN.

[BTW, it is suggested you change you setup your router to give out another set of IPs other than 192.168.1.x. Why? Because you want to avoid IP conflicts from other routers you might use when away and your home LAN. Just replace the ".1." with some number of your choice. Look here for IP ranges to use.]

You must log in to answer this question.

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