cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6349
Views
0
Helpful
3
Replies

Access server from Inside network Using public IP

Claudiu Negut
Level 1
Level 1

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 3

raulpac
Cisco Employee
Cisco Employee

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

 

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

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?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: