Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 969
  • Last Modified:

FreeNX NXClient connect to ubuntu private ip over WAN

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
Thyagaraj03
Asked:
Thyagaraj03
  • 12
  • 9
3 Solutions
 
TobiasHolmCommented:
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
 
Thyagaraj03Author Commented:
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
 
TobiasHolmCommented:
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Thyagaraj03Author Commented:
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
 
Thyagaraj03Author Commented:
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
 
TobiasHolmCommented:
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
 
Thyagaraj03Author Commented:
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
 
TobiasHolmCommented:
Yes, if you allow port 22 you should be able to connect using your public IP address from internet.

Regards, Tobias
0
 
Thyagaraj03Author Commented:
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
 
TobiasHolmCommented:
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
 
Thyagaraj03Author Commented:
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
 
TobiasHolmCommented:
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
 
Thyagaraj03Author Commented:
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
 
Thyagaraj03Author Commented:
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
 
Thyagaraj03Author Commented:
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
 
TobiasHolmCommented:
>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
 
Thyagaraj03Author Commented:
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
 
TobiasHolmCommented:
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
 
Thyagaraj03Author Commented:
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
 
Thyagaraj03Author Commented:
May be I mean to say appearance!
0
 
TobiasHolmCommented:
Hmm. Less graphics like in fewer colors? Maybe you can you show me some screenshots?

Regards, Tobias
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 12
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now