Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to configure cisco 7301 with list of hostnames/ip's. These need to be forwarded to internal ip's/ports (depending on the hostname)

In the current setup... www.frog.com, ip 82.45.100.100 nat's to internal 10.0.0.1 go to www.frog.test, firewall allows and nat's to 10.0.0.1 - no problems

But now i have a need to make it so that different URL's go to different tcp ports on server eg.

www.frog.test - should go to 10.0.0.1:80 www.frog1.test - should go to 10.0.0.1:443

Not sure how I can do this..?

Thanks

share|improve this question
up vote 0 down vote accepted

This takes more than configuring your router. You have to configure DNS as well.

First, set up an A record for frog1.test (I assume you already have one for frog.test)

Next, you want to add an srv record to each domain record (one for frog.test, one for frog1.test).

A SRV record record contains the following information:

Service Name: the well know name of the service

Protocol: specifies if this is a TCP or UDP service

Domain Name: the domain name that this record belongs to

TTL: Time to Live value

Class: DNS class field. This always has the value of "IN"

Priority: when multiple hosts are configured for the same service, the priority determines which host is tried first

Weight: A relative weight for records with the same priority

Port: the TCP or UDP port that the service uses

Target: the name of the host providing the service

Yours will probably look like this when it's configured:

_www._tcp.frog.test. 86400 IN SRV 10 5 80 www.frog.test.
_www._tcp.frog1.test. 86400 IN SRV 10 5 443 www.frog1.test

Next we have to tell the router what to do with these connections

ip nat inside source static 10.0.0.1:80 82.45.100.100:80
ip nat inside source static 10.0.0.1:443 (IP address of frog1.test server):443

If I remember correctly, to test this on the router you type:

show ip nat translations

You should see:

    frog Inside global       Inside local      Outside local      Outside global 
--- 82.45.100.100:80         10.0.0.1:80           ---                 ---

You should also see an entry for the 443 port.

Just to make sure we understand each other, this builds a static route from your server through the router. This won't be a DHCP set up. This means you have to set the IP address configuration in your server (gateway address, IP, subnet mask, etc).

Note: Doing all this from memory, and haven't had coffee yet

share|improve this answer
    
I didn't realise there was so much to it, thought I'd be able to do all the router. Thanks a lot for your help, that's given me more to look into ! – Jude Aug 13 '12 at 14:46
    
Glad to be of service. May I recommend marking this as answered? – Everett Aug 13 '12 at 14:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .