Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Recently, I built a computer running Ubuntu and gave it away to a relative. I'm willing to give them IT support for free, but they live 50 miles away. The Solution? A NX Server. I setup the Node, Client and Server on her computer, with the client only on my computer. It's working out fine, but the only fear I have is other people accessing the server. I want only a few computers to be able to access the NX server, and nobody else. How do I go about doing this? By the way, both computers (relative's computer and my computer) are running 12.04, with a few computers that may access running CentOS 5.

share|improve this question
Do you really need GUI access? I prefer ssh for remote management. – guntbert Feb 3 '13 at 19:56
A lot of configs are through gui. For example, fixing a thunderbird problem. – sharksfan98 Feb 3 '13 at 20:13
What NX server (and version) did you install exactly? Nomachine? FreeNX? X2Go? Neatx? – gertvdijk Feb 3 '13 at 21:47
I'm trying to use Nomachine, but FreeNX would work great as well – sharksfan98 Feb 6 '13 at 1:00
up vote 1 down vote accepted

I would suggest using X2Go, which is based on NX, but incompatible with Nomachine NX. Everything is over ssh, and it supports PulseAudio etc. It's been very much more user friendly than FreeNX.

share|improve this answer
Thank you! Perhaps a link to documentation or official site? – sharksfan98 Aug 11 '13 at 15:56

I would do this...It will block all traffic to a port except from your ip.

iptables -A INPUT -p tcp --dport 8000 -s -j ACCEPT iptables -A INPUT -p tcp --dport 8000 -j DROP

Where 8000 is the nx port and is your ip address.

share|improve this answer
This may as well work. I'm not sure since this solution looks like it requires a few steps, but I'll give it a try. I blocked the ssh and telnet ports for starters. – sharksfan98 Mar 19 '13 at 21:18

You could also use SSH just for tunneling (ssh -D 1080 user@ip") and allow only connections from / localhost. Then tell your client to connect using a SOCKS 5 proxy at This will not only use the security ssh offers and not lock you out if you get a new source ip but also will take your worries about exposing your server.

share|improve this answer

NX is already secure since it uses encryption and authentication so there is no need to tunnel or use something else.

from their feature matrix here:

  • Secure communication protected by SSL cryptography Full encryption
  • for UDP traffic Kerberos password authentication PAM based
  • authentication Support for industry standard SSH protocol Kerberos
  • ticket authentication and ticket forwarding to the session
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.