Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2011
A newbie's questions about networking
I am relatively new to networking, so please tell me if I missed some important info or something. (I am also new to Linux Forums, and it's not letting me use the at sign yet, so I'll use percent signs until I have 15 posts. ) I have two servers on my LAN, one Debian and one Ubuntu. Their names are aura and neko respectively. aura is hosting a game server (minecraft) and ssh, and neko is running ssh and ftp. I would like to be able access each's ssh from the outside world without changing the port numbers on my router. I have a setup right now where my router forwards external port 900 to aura's port 22, and external port 22 to neko's internal port 22. I would like to be able to typeCode:
Take a look at the man page for ssh_config (do 'man ssh_config'). This tells you how to set up your ssh configuration. The file it is your own user one (usually ~/.ssh/config) on the machine you're connecting from.
You can add settings here to specify which port to use and which username to use for each given server. If you're sshing between the machines, into either of them from outside your network and into each other from there, you might also want to adjust the copy of this file on each of your server so they connect the way you'd expect to each other.
- Join Date
- Feb 2011
Thanks, Roxoff! I have one question after reading this though. The setup that you described forwards connections to other computers for usernames defined in the ~/.ssh/config, so would different usernames be required on each server?
Update: Maybe more than one question, actually. After reading the ssh_config man page, I am a little lost as to what options I need to set in /etc/ssh/config. Also, I am thinking of configuring aura to handle mail as well (It is more powerful than neko) and was wondering if it was possible to set subdomains to point to different servers within the same LAN. So, something likeCode:
www >> neko mail >> aura
Last edited by willnoit; 09-29-2012 at 10:06 PM.
For each server (and you can specify them separately in your .ssh/config file) you will want to use the username you're known as on that target server. The idea is to try and get your client to use 'ssh neko' and 'ssh aura' from wherever you are.
These two services run on different ports. Forwarding is defined on port+ip address, so you can certainly forward the email port to whichever machine is doing it without interrupting your web services.