I do not suggest placing your device into a DMZ under any circumstance, unless you really know what you're doing and can properly secure the device and the network surrounding it.
There is software that can emulate a LAN through the internet, called LogMeIn Hamachi. By installing and enabling this on the host, you can access it by logging into the VLAN anywhere on the internet.
Although I don't necessarily see the problem with Port Forwarding.
Another option is to use SSH's built-in Port Forwarding feature. If there is another SSH host accessible from the internet (we'll call it Host 1) on the same LAN as the host you're trying to connect to (Host 2), you can issue a command that bounces the connection from your computer (on a specific local port) through Host 1, and Host 1 routes your traffic to the non-port-forwarded Host 2 in it's LAN.
The command is as follows and is to be executed on the local machine that you're trying to use to connect to Host 2
ssh -L [local-port-to-open]:[local-IP-of-Host-2-according-to-Host-1]:[port-to-connect-to-on-Host-2-from-Host-1] [user-of-Host-1]@[Host-1-address]
This will open a port on your machine (your
[local-port-to-open] argument) that SSH manages, sending any traffic from that port through the encrypted tunnel made my the
[user-of-Host-1]@[Host-1-address] arguments to Host-2 as specified in
[local-IP-of-Host-2-according-to-Host-1]:[port-to-connect-to-on-Host-2-from-Host-1]. This method is called Local Port Forwarding (I don't really understand remote port forwarding).
For example, say I want to connect to Host 2, which is not port forwarded, from my local coffee shop, using Host 1, which is port forwarded, to bounce the connection into it's LAN. Note that this will open a PTS on the remote machine, but it can be ignored until you want to close this tunnel. Then you can just close that terminal session as you would normally.
Host 1's public IP is
18.104.22.168 (the NAT that encapsulates both Host 1 and Host 2) on port
1337 for SSH. Host 2, in the LAN, has the local IP of
192.168.254.40 and uses port
22 for SSH. Host 1's login username is
Ok, so I'll just say that I have the local port
8080 unused and can use it for this demonstration temporarily.
The command I would form is as such:
ssh -L 8080:192.168.254.40:22 firstname.lastname@example.org
Now that opens port
8080 on your local computer and sends to to
192.168.254.40 on port
22 (Host 2) according to Host 1 (which is
Now if you want to SSH into Host 2, all you have to do is specify your computer on port
8080. Let's say that Host 2's login username is
ssh email@example.com -p 8080
SSH is managing your port
8080, and it sends your SSH request to Host 1, which sends it to Host 2. Please note that, as opposed to using
127.0.0.1, you can also just use
localhost. It's just preference.
Another use of SSH Port Forwarding is proxies.
Scenario: I'm at school with my personal laptop and want to access Twitter, which is blocked (it actually is at my high school, so I've done exactly this). I have a port-forwarded SSH host at my house with the IP
22.214.171.124 on port
1337. I want to bounce a connection to Twitter (web servers are most commonly hosted on port
80) from my port
8080 on my laptop through my host at home.
I would issue the command on my laptop:
ssh -L 8080:twitter.com:80 firstname.lastname@example.org -p 1337
Now I can access
localhost:8080 in my web browser, and it will route Twitter through my encrypted tunnel, from their servers to my home then to my laptop at school.
I can use this same method to log into a website that does not use SSL (pastebin for example) in public and be sure that my credentials are safe because it's encrypted using SSH and only sent without SSH from my home, which I've made sure is secure.
EDIT: Just a side note, the IP addresses shown here should not be valid addresses, but on the off-chance that they are, please do not harass the users of these IPs.