Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Access server from Inside network Using public IP

Hello,

 

I have now configured my 1941 router to allow access to a internal server (192.168.1.251:8080) from outside network by using public IP (X.X.X.X:8080)

I want to use the public IP also while i'm in the internal network so no matter where I am, I want to access the 192.168.1.251:8080 server using the public IP X.X.X.X:8080

I have tried using domaninless NAT but i think something is wrong. My full config is attached. What should i chnage to make it work?

 

Thanks,

Claudiu
 

 

 

*****UPDATE**** not sure how this works but i manage to solve the issue by adding on each interface (external/internal) the "no ip redirects" line

3 REPLIES
Cisco Employee

Hello Claudiu,I understand

Hello Claudiu,

I understand that you want to have access to a server no matters if you are in a public or a local network right?

 

Well, first regarding to have access to server from a local network you just need to have an ip address from the same server's network and if it is the case in the same vlan. Perhaps you can get this ip address from DHCP server or you can configure it manually.

 

In the case you want to have access from a public network. You need to configure NAT in at least to ports on your router. One has the inside ip address and the other with the outside ip address. Besides you need to indicate with the commands "ip nat inside" and "ip nat outside" which interface will work as inside port and the outside port.

Watching your configuration. I assume that you want to connect via HTTP or well a specific port. For that reason you should use an extended control access-list which allows you to specify the protocol or the port you want to use.

I share with you a link where you can find different ways to achieve what you need. Choose the best option for you, I know you will find it very helpful.

http://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/13772-12.html

 

Regards!

 

Raúl Pacheco

 

New Member

My server IP is 192.168.1.251

My server IP is 192.168.1.251 and the port that i use for access is 8080

I can already (currently with the configuration presented on this thread) access the server as follows:

1. From internal network by 192.168.1.251:8080

2. From any public network by X.X.X.X:8080

 

What i now want is to access the server from internal network using the public IP X.X.X.X. So no matter where I am (public network or internal), I want to access the server using the public IP.
 

Regards,

Claudiu

New Member

I would also like to know how

I would also like to know how to do this. Sorry to piggyback on your question. I have a 1921 ISR and have a similar problem where if I'm on my internal network, I cannot access my internal HTTP server using the public IP address but I can using the internal IP address. However, if I'm on an external network, I CAN access my HTTP server using the public IP.

I suspect it's because if I try to access my HTTP server using the public IP address while on my internal network, there will be some sort of route loop, which gets prevented.

Is it possible to create a static route that re-directs all matches to the public IP address in question to the internal IP address of the HTTP server?

1882
Views
0
Helpful
3
Replies
CreatePlease to create content