5

I have a Cisco3900 called router A (192.168.100.1), which is interconnected to another router B (192.168.100.2). I want to access my server C 220.221.x.x (which is on internet).

Router A (192.168.100.1) is configured with:

ip route 220.221.x.x 255.255.255.255 192.168.100.2

Pinging 220.221.x.x from router A 192.168.100.1 works, all ssh,telnet, works.

I want to open a port at 192.168.100.1 like 192.168.100.1:8080 forwarding traffic to 220.221.x.x:80

For example, when I visit 192.168.100.1:8080, it should show 220.221.x.x:80 data.

How can I configure Router A to forward port 8080 requests to 220.221.x.x:80?

I tried: ip nat inside source static tcp 220.221.x.x 80 192.168.100.1 8080 but when i try to load 192.168.100.1:8080, it hangs up and nothing like 220.221.x.x:80 opens. I want it to load 220.221.x.x:80 website.

Diagram diagram

  • @Albert, this would be a lot easier if you wanted to connect 192.168.100.2:8080 -> 220.221.x.x:80. Are you open to doing it that way? If not, are you willing to use multiple physical interfaces on Router A, instead of just one interface? – Mike Pennington Mar 25 '14 at 8:36
  • @Albert from where are you trying to reach 192.168.100.1:8080 ? – radtrentasei Mar 25 '14 at 8:41
  • @MikePennington 192.168.100.2 is a zte router, zte doesn't support port forwarding. (ZXR10) I am willing to open port on 192.168.100.1(Cisco), which then send request to 220.221.x.x as it is configured to be routed on 192.168.100.1 to the gateway 192.168.100.2. – Albert Mar 25 '14 at 9:44
  • @radicetrentasei I am willing to reach 192.168.100.1 from outside network. ie I am not connected to 192.168.100.1 directly as a gateway client.And also tell me if i connect with 192.168.100.1 directly what should make it works ? – Albert Mar 25 '14 at 9:48
  • @Albert, given that the ZTE doesn't support port forwarding, the best thing you could do is swap Router A and Router B; there are other solutions, but this makes things substantially easier to maintain. Failing that, you're looking for a NAT on a stick config (and I don't have time to build that explicitly right now); NAT on a stick is also known as "Hairpin NAT" – Mike Pennington Mar 25 '14 at 13:02
2

i belief you have made 1 mistake in your mind. The Router is for routing.

set up an Proxy Server with your 8080-Port open. In the Proxy configuration you can create a rule whitch pipe's the requests from PROXYIP:8080 to 220.221.x.x:80.

Your main Problem was " I want it to load 220.221.x.x:80 website" why not just use one of your clients and out of RouterA-Network you dont must create an Port-forwarding.

if you like to hide the ServerC-Address from your users use the proxy-configuration discribed above.

.

just in addition

You just need a Port forwarding for the opposite case. If you try to connect ServerC (Internet) with one Client in RouterA-(local)Network. Than configure a Static Ip for the Client and than configure your NAT as you done but with the Client-Adress

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.