I have a remote linux Idebian) VPS that I would like to somehow attach to my local lan and give it a local IP address so I can access it and all ports like it was right beside me. I also have a debian server at my house and everything is behind a router (DD-WRT). Would I create some kind of VPN to achieve this? If so, a brief introduction would be great!
The easiest way would be to perform an SSH Tunnel and mount drives via the tunnel. Another option would be to utilize a VPN - the concern / issue here is What kind of VPS
If the VPS is based on OpenVZ (para-virtulization) than you need to do the ssh tunnel for this reason I will just cover the SSH method.
SSH can give you authenticated and encrypted connections to remote computers. If you set up keys you can make these connections without passwords.
ssh-keygen -t dsa
You will be prompted for a file in which the key and a passphrase will be saved. Just go ahead and press enter through each - the file will be named id_dsa and your private key will not be protected by a password.
Once this is done, you will see id_rsa and id_rsa.pub in the .ssh directory in your home directory.
scp ~/.ssh/id_rsa.pub remote_host:/
cat ~/ id_rsa.pub >> ~/.ssh/authorized_keys
One last thing - you should do this going reverse as well - this time name the file server2 or something similar so you know the difference - and BE SURE TO COPY that filename.pub to the other server when doing the scp command.
Next we will get into the SSH Tunneling:
Tunneling is a super powerful concept that allows you to connect two servers as if they were connected locally.
where: -L - port forwarding parameters (see below) localport - local port (choose a port that is not in use by other service)
Keep in mind - this might need to be a little different for the reverse - since you may need to do some port forwarding first
One final thing...
Make sure to setup a USER and do not use ROOT. Why - because if you send the wrong thing across either way - you could not only kill the connection BUT you could kill one machine or another...