[Ilugc] remotely accessing a machine on a lan with dynamic IP

  • From: rajasuperman@xxxxxxxxx (Raja Subramanian)
  • Date: Wed, 8 Feb 2012 19:48:44 +0530

On Wed, Feb 8, 2012 at 3:54 PM, kenneth gonsalves
<lawgon at thenilgiris.com> wrote:

I maintain a server in a remote place. It is connected to a LAN - the
LAN is the usual poor man's LAN which uses the BSNL router as the dhcp
server. They have dynamic IP from bsnl. The machine the machine has a
fixed IP (192.168.1.123). The inward facing IP of the router is
192.168.1.1. Is it possible to ssh into this machine from outside, and
if so how?

Others have already suggested the port forwarding method. Only
addition I would like to make is that you also configure iptables
connection rate limiting for ssh. This will ensure your server is not
brute forced by bots. I recommend you do this on all internet facing
servers.

Alternate methods which do not require port forwarding:

1. Initiate a connection from the internal server to an external server
and port forward from external server to internal ssh.

2. From your internal server connect to an external OpenVPN server.
From this external network, you can ssh to the internal server's VPN
interface IP address.

- Raja

Other related posts: