img by Coba

How to Access a NAT'ed Windows Server via a VPN solution

I received an email from LearnItFirst user, Armand, today asking about Windows Server training on using VPNs and Windows Server:

If you have a training video(s) on how to access a NAT'ed Windows server via a VPN solution (via Cisco or any 3rd party tunneling tool), that'll be greatly appreciated. I'm trying to carve out a small I.T. business of my own (with the stuff I'm learning from YOU!!!) and one of my biggest challenge is how to 'tunnel' into a customer's intranet without having to buy expensive firewall/switch equipment. The solution I'm currently using is "GotoMyPC" by Citrix (poor man's VPN) but the monthly subscription can/does add up quickly.

We don't have any videos dealing with this specifically because it typically has something to do with your firewall - and not windows specifically.

Here is the scenario you need, and pretty much ANY home or small-business router has the capability. However, Security should be an important concern - so you might end up staying with GoToMYPC. (BTW: If you try to cancel your account with GoToMyPC - they will often drop the price significantly to keep you around).

NAT shares a single IP address with multiple internal computers.

When an internal computer goes out to the internet, the NAT substitutes it's public IP address and makes the connection to the public web server. It also makes a note in a table that it should send return traffic back to the internal computer

Here is what it kinda looks like - if you understand IP Addresses and Ports. Assume we have 2 PC's inside our network

clip_image002

Both can surf the web at the same time, because the NAT will replace the internal IP address (the 192.168.0.10 & .11) with the outside address, and make the connect tot he remote web servers. As you can see in the above diagram, both PC #1 and PC#2 are surfing the same website, and PC #1 also has a connection to another web server. The NAT knows that anything coming back from the web server to Port 5543 should be send back to PC #1 port 2605, anything coming back from the Web Server to port 5544 should go back to PC #2 port 8731, and anything coming back from the third web server to port 5548, should go back to PC #1 on port 2606.  The 2605, 8731, and 2606 are dynanically assigned, since they tell the remote server where to send data back).

The problem is - what happens if someone sends a packet to Port 3389 (the Remote Desktop Port) to 67.1.2.3 (the public IP address of our NAT). since there is NOTHING in the table - it will ignore the request.

If you have a static public IP address (or a pretty stable dynamic public IP) - you can add an entry on your router that says

clip_image002[6]

If it's a simple Netgear or Linksys - you will probably find this under a DMZ Host (which is usually just expose this specific internal address to the Internet on the public). Look for an option such as DMZ Host, or port mapping where you specific the external port (RDP is 3389) and which host you want that routed to)

A mid-range device will be easy to manage (like a Cisco SA520 or SA540, or Sonicwall) - in the $400-$800 range

For example - here is an screen shot from the Cisco SA540 - on the IPv4 Rules - I would just add the rule (for the type of service), the Outside address, and the inside address)

clip_image002[8]

If you have a more complicated environment - I HIGHLY recommend something like a Cisco ASA5505 (less than US $400 for a less than 10 user model, less than $600 for a 50 user model)  then this will be done with NAT rules and Security Rules. (the NAT rules define the IP address translation for incoming connections, and can even do Port translation - which is what I'm showing in the table above). Even better - these all support VPN connections, so you can remotely connect and it looks like you are sitting inside the network.

And here is the sort of things you would see on a Cisco ASA5505

These are NAT rules (we have 5 public IP addresses on this network - so we specify which Internal hosts are exposed on the outside)

clip_image002[10]

Security rules (specifying what Source addresses can connect to what ports)

clip_image002[12]

Hope this helps

- Grant

authors
scott whigham
grant moyle
chad weaver
recent comments
  • Website SEO: Excellent job. read more
  • Vivian Dozar: What does not destroy me, makes me stronger. — Nietzsche read more
  • Kitty Pages: A topic close to my heart thanks. Please consider a read more
  • carpet cleaning: Excellent job. read more
  • kampanie AdWords: Nice site and great text. read more
  • Sidney Macartney: A very interesting read and a great post alltogether. Would read more
  • Bridgette Vilches: A very interesting read and a great post alltogether. Would read more
  • Kristofer Araiza: A very interesting read and a great post alltogether. Would read more
  • Titus Eichele: A very interesting read and a great post alltogether. Would read more
  • Garret Skweres: A very interesting read and a great post alltogether. Would read more