PDA

View Full Version : OSX Server help




Iiwii
May 29, 2012, 01:05 PM
I am a bit of a newbie at this and I tried looking for the information online but I'm not sure how to call it, I though it was sub domain, but when I look online for information I get something else. This is my situations
I have two computers, one is a Mac Mini with OSX Lion Server and the other is a random desktop running Ubuntu. When I am away I use my Macbook Air to VNC into my Mac Mini, but I want to vnc into my desktop also. When I want to vnc into my Mac Mini I press command+k and type in "vnc://example.com" and it works. I want to set up something like that for the other computer like "vnc://second.example.com" I'm not too sure the steps I have to take for that, but I have tried going into Server Admin and DNS>Zones. I added a Machine(A) with the local ip but when i try the address it just goes back to my Mac Mini not the other computer. Does any one know how I can do this or the name of the method its called. I'm not even sure if I should be setting it up from the Mac Mini or from the other computer.... If I'm suppose to set it up on the other computer then sorry for posting it here. I'm just a bit confused and don't know how to call it.



fotoruss
May 30, 2012, 08:03 AM
I'm assuming you have the Mac Mini and Ubuntu box behind the same firewall and internet connection. Is that correct? If so, you will need to setup port forwarding in your firewall and point specific ports to specific IP addresses.

For example:
5900 (default vnc port) goes to Mac Mini: 192.168.0.1
5901 goes to Ubuntu: 192.168.0.2

When you connect you just specify the port and your router will direct your connection to your desired IP address.

Iiwii
May 30, 2012, 09:28 AM
Thank you for the response, I have already set port forwarding and I can connect to it from my external ip, but i would like to setup DNS so that i would have to type in a domain name. Since I have my Mac Mini with a domain name i can vnc into that with the domain name. I want to do the same for the other machine but with another name.

Mac Mini vnc://example.com
Ubuntu Desktop vnc://second.example.com

That is how I would like to connect to my other machine
I tried setting up an Machine Record with the local ip of the ubuntu desktop, if I'm on my Mac Mini and vnc with (vnc://second.example.com) it will work, but if i vnc with the same things (vnc://second.example.com) from my MacBook Air it will connect to my Mac Mini.

Iiwii
May 31, 2012, 07:55 AM
So I have been looking online and came up with another solution, instead of having different machine names like second.example.com, I just changed the port numbers for ssh and vnc on the other computer.
So if I want to ssh into my Mac Mini(server) i type in "ssh user@example.com"
and if I want to ssh into the Desktop, since I changed the ssh port number to something else like 77 I type in "ssh user@example.com -p 77"
Not what I originally wanted but it works.

fotoruss
Jun 4, 2012, 03:45 AM
So I have been looking online and came up with another solution, instead of having different machine names like second.example.com, I just changed the port numbers for ssh and vnc on the other computer.
So if I want to ssh into my Mac Mini(server) i type in "ssh user@example.com"
and if I want to ssh into the Desktop, since I changed the ssh port number to something else like 77 I type in "ssh user@example.com -p 77"
Not what I originally wanted but it works.

Glad to hear that solution works for you.

With the original way you wanted to set it up you would have had to change external DNS records, not the internal machine DNS records on your mac mini. Because you are connecting from the internet, the internet needs to know where second.example.com actually is. I think that's where the problem lies?

I could be wrong here, but I would suspect to achieve that you would need to add a specific record in your example.com external DNS settings which points to your external IP address, and then setup a re-direction in your NAT router to point to an internal address when second.example.com gets hit.

Thoughts?