09-09-2014 12:06 AM - edited 03-07-2019 08:41 PM
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
09-09-2014 10:24 PM
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
09-09-2014 10:43 PM
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
01-22-2015 06:52 PM
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?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide