Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Domain to internal IP conversion 1

Status
Not open for further replies.

alex3948

Programmer
Mar 4, 2012
3
0
0
CA
Hi, I'm new here and found quite a few articles from your forums on Google, so I've decided to give it a try :)

My question is pretty simple but I may be missing something important. We have the setup below (see attachement).

All I am trying to do is access one of the hosts by its external DNS hostname. The public DNS has been set-up, so when I ping web01.myhost.com, my router responds. I want the router to route all query for "web01.myhost.com" to the internal host (10.2.0.1). Is there a way to achieve that using NAT?

Thanks.
 
You can do it with NAT, but you will need an external address for each internal host. Another option would be directing individual ports from the outside, to specific hosts on the inside. I've done this with web servers before, just pointing port 80 to a specific address behind the external address.

 
Thanks for the reply, the problem is, if by example I want to SSH a particular host from the outside, just fowarding the port 22 to a particular host won't work. I want to be able to select which host, but I only have 1 public IP.

Is this possible ?
 
You could do what you want but only by translating the port number as well - i.e.

External IP TCP port 8022 -> Internal Host 1 TCP port 22
External IP TCP port 8023 -> Internal Host 2 TCP port 22
External IP TCP port 8024 -> Internal Host 3 TCP port 22

You could also SSH to the router itself and then SSH from the router to the internal hosts. You could also set up a Remote Access VPN, tunnel over the internet to your router and then 'appear' like you are on your internal private IP network (an IP pool on the router for RA VPN clients).

Andy
 
Thanks for the tip, I'll setup a VPN right now :)
 
You can perform this by using static nat also .

ip nat inside source static <public ip> <port> <private ip> <port no.> extendable..

let me know does it got worked or not...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top