Solved

FreeNX NXClient connect to ubuntu private ip over WAN

Posted on 2011-03-15
21
915 Views
Last Modified: 2013-11-15
I tried FreeNX and NXClient connecting from my laptop to my deskop running ubuntu desktop over WAN(laptop and desktop has separate public ip each). I felt it's very fast.

I'm trying to connect from my home desktop to the office. In my office a single Dynamic public ip is used to access internet and all the systems are in LAN in the network 192.168.3.0. Does anyone know how could I connect to this private network(192.168.3.5) of particular system with FreeNX over WAN.

I was using ubuntu's shipped VNC which is dead slow and I've changed the default vnc port in the 'gconf-editor' and allowed the new port in the modem.

I have to connect to office system with ip 192.168.3.5, what should I do?. If in my office it has only one system it wouldn't be any problem, I'll directly enter the dyndn domain name(registered for dynamic public ip) in the Host field of FreeNX.

- Is any port should be opened in the modem(FreeNx was using 22)
- What I should enter in the Host field of FreeNX?. Ofcourse dyndns domain name but how could I connect to the particular system in the private network(192.168.3.5)

Anybody could solve this? please!
0
Comment
Question by:Thyagaraj03
  • 12
  • 9
21 Comments
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35136725
Hi!

You need a public IP to be able to connect to your office. Set up DDNS or similar on your office modem/router if you don't have a static public IP to your company.

Then map an external port, like 8888 to the internal port 22 (that FreeNX are using). Then you can connect from home using the companys public IP and port 8888.

More help: https://help.ubuntu.com/community/FreeNX

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35136826
Hi!

I followed the same tutorial. My office has the dynamic public ip address and all the system in the network 192.168.3.0 can connect to the internet and browse. I've already registered with dyndns domain.
The only problem is how could I connect to my office system 192.168.3.5. In my office on all the system is installed and are running on port 22. Connecting to the particular system is the problem as what should I mention in the NX client?
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35137128
You can set up several port mappings in your office modem/router. Let's say your public IP are 200.1.1.1 and you have three computers in your office with IP 192.168.3.10-12, then you can map:

IP 200.1.1.1 port 8888 ---> 192.168.3.10 port 22
IP 200.1.1.1 port 8889 ---> 192.168.3.11 port 22
IP 200.1.1.1 port 8890 ---> 192.168.3.12 port 22

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35137407
Very intresting, I'll try this. I found in my office, ISP modem is connected to the Linksys router and router is connected to DLink Switch again. I should try port mapping in the router.
0
 

Author Comment

by:Thyagaraj03
ID: 35146077
I think I need your help again!. The following are the two options availale in the Linksys router. 1. port forwarding and another 2. port trigerring. I will be editing the port forwarding and specify the vnc port(5900) no as shown below. I'm not sure what to do again,


                        Port Forwarding

Application        Start             End           Protocol                            IP Address                   Enable
ssh                        22               to     22       BOTH                     192.168.3. 2                          yes
cvs                      2400       to       240   BOTH                          192.168.3. 3                          yes
vnc1             5900      to       5900      BOTH                         192.168.3. 5                          yes
vnc2              5901      to       5902      BOTH                        192.168.3. 10                          yes




                              Port Triggering
         
              Triggered Range                          Forwarded Range             
Application       Start Port       End Port              Start Port             End Port       Enable
                                      to                               to             
                                      to                                  to
                                      to                                 to
                                     to                                 to

0
 
LVL 18

Accepted Solution

by:
TobiasHolm earned 500 total points
ID: 35147580
Well, seems like the Linksys can't map one incoming port to another local port.

Set up FreeNX to use different ports on each client. See my link above in the section "Configuring SSH port". Ref: https://help.ubuntu.com/community/FreeNX

Example Port Forwarding in your Linksys:

nx1             8888      to       8888      BOTH                         192.168.3. 5                          yes
nx2             8889      to       8889      BOTH                         192.168.3. 10                        yes

Setup up the 192.168.3. 5 client FreeNX to use port 8888 and the 192.168.3. 10 client FreeNX to use port 8889.

I don't think you need "Port Triggering" at all.
See: http://www.dslreports.com/forum/remark,1020195;root=equip,16;mode=flat

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35147929
So it's again coming to the ssh port, instead changing, I use the default 22 port and allow it in the router.

Previously, as I said  I was using VNC and I open the port like below:
vnc1             5900      to       5900      BOTH                         192.168.3. 5                          yes

Now, if I use the below, I should connect it, I guess
vnc1             22      to       22      BOTH                         192.168.3. 5                          yes

correct me if I'm wrong?
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 500 total points
ID: 35148116
Yes, if you allow port 22 you should be able to connect using your public IP address from internet.

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35149120
So if I want to open the port for another computer I've to change the ssh port of that computer and allow it in the router?
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35152215
Yes. But if you had a router that could map an external port to a different port you could have the same port for NX on all your clients. D-link DIR-655 is a router that can do this.

Regards, Tobias
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Thyagaraj03
ID: 35158231
No, I've changed by ssh port to 8888 and opened it in the router and when I tried from my home, it didn't connect saying 'connection error' with the following details

NX> 203 NXSSH running with pid: 2655
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: my.public.ip.here on port: 8888

0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 500 total points
ID: 35158514
So, did you change the NX client in the office to use port 8888? Or does it use port 22? Which port did you open up in the Linksys router?

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35162541
I changed the ssh port no to 8888 and opened 8888 in the Linksys router and in the nxclient(from home) I used my office dyndns domain name(it automatically resolved to ip) with the port 8888 and thus the output
0
 

Author Comment

by:Thyagaraj03
ID: 35162626
I guess there is problem from my side. ie, I changed the vnc port(gconf-editor) in the os to 8888 and ssh is also using 8888 and its port conflict I think so and I found this now when I try to connect the sytem  with 'ssh -p 8888 192.168.3.5' and it didn't connect.
0
 

Author Comment

by:Thyagaraj03
ID: 35162646
I'll change the ssh port to some other and check allowing in the router.

One small doubt:
In my office, I'm in the same network(192.168.3.0), I opened the nxclient and I used 192.168.3.5 with port 22(before changing the port) and it connected. Won't it connect if I use my dyndns domain name instead 192.168.3.5?, I tried but it didn't. Why I'm asking this is because I've go home and check connecting to office. So I'm thinking if I could connect from my office itself to my office computer with public ip/dydns.
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35162960
>Won't it connect if I use my dyndns domain name instead 192.168.3.5?

Not if you're on the inside of your office. Then you have to use the 191.168.3.x net.

The trouble seems to be the client in the office ain't answering on port 8888.

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35166719
Tobias, it's awesome!. you finally made me make it work. As I said both vnc and ssh are running on the same port, I changed ssh port to different and followed your instructions and checked from my home and it connected. Thanks a lot!!!

The small problem is graphics are not good. when I connected from windows(home) to ubuntu(office), the appreance and graphics are good but from ubuntu to ubuntu it's not. If you have any tip, please. I'm not expecting any solution still just want some reply and I'll close this accepting your answer. Thank you!
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35166904
That great to hear!

>graphics are not good

What type of problems do you have? Is it slow, or can't you see the client at all (black screen) or something else?

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35166967
No, it's not a problem, it's really fast and I could see everything but with less graphics i guess i.e windows side bars are shaded colors like a server how it looks with less graphics(launch panel, taskbar...)
0
 

Author Comment

by:Thyagaraj03
ID: 35166999
May be I mean to say appearance!
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35168527
Hmm. Less graphics like in fewer colors? Maybe you can you show me some screenshots?

Regards, Tobias
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now