开发者

How to avoid connection loopbacks with DynDNS when I debug locally?

开发者 https://www.devze.com 2023-03-19 15:46 出处:网络
I\'m developing with Java GAE and Google API\'s with OAuth authentication that requires an URL Callback that receives the access tokens.

I'm developing with Java GAE and Google API's with OAuth authentication that requires an URL Callback that receives the access tokens.

To test locally, running Jetty in 127.0.0.1:8888/home.html?gwt.codesvr=127.0.0.1:9997, I've configure a DynDNS domain and set my router to redirect traffic from port 8888 to my machine.

When I do that DynDNS domain shows my router web configuration page, like I was browsing to my router local IP.

I've achieved a workaround activating my StrongVPN account to trick the router loopback, but when DynDNS refresh the VPN IP I can't access anymore, well I have to wait a lot of time to do the trick again.

How can I avoid these loopback connections? Should I set up a proxy? Anyone has met this scenario (local debug GAE+G.APIs+OAuth)?

Edit:

I'll show you my LAN configuration (trying to discard causes):


INTERNET (WAN IP) <-> ISP Router (192.168.1.1) <-> (192.168.1.2) Neutral Router (192.168.0.1) <-> (192.168.0.XX manual static IP) MacBook Local Server

I set this port forwarding configuration in my ISP Router to redirect the incoming port 80 connections to my 8888 port - TCP port 80 to 192.168.1.2 port 8888

I set this port forwarding configuration in my Neutral Router - Port 8888 to 192.168.0.XX

The configuration described would be OK because if I access through my mobile 3G connection to mydyndns.dyndns.org I access to Eclipse local web server.


Then, I tried to edit host file as Owen "point your DynDNS domain to 127.0.0.1" says but without success :(

If I set '127.0.0.1 mydyndns.dyndns.org' in my hosts file dyndns domain doesn't work, I think is because port forwarding, but I receive a not found, as if I type 127.0.0.1 in the browser. Eclipse server is attaching 127.0.0.1:8888 then port 80 doesn't have nothing to show.

If I set '127.0.0.1:8888 mydyndns.dyndns.org' in my hosts file I access to the ISP Router web configuration page as I was typing 192.168.1.1. But开发者_开发问答 the address is inmediately replaced on the browser address bar for MY_WAN_IP:80

Then I think that a connection loopback is happening. Any idea about how to fix that :(?


You could edit the hosts file on your machine to point your DynDNS domain to 127.0.0.1 That's what I do.

The location of the hosts file depends on your operating system. Check the Wikipedia article to find it's location in your OS and how to edit it.

In addition to editing your hosts file, I think you can follow the advice in this question/answer to locally forward. https://serverfault.com/questions/102416/iptables-equivalent-for-mac-os-x


I change my ADSL Provider and the main router, with that I reconfigure the scenario as the documents says and it works.

I'm sorry for so specific question, that was a ISP problem who, for any reason, don't support or has any undocumented custom configuration to configure your own server.

Thanks


I fixed this problem by connecting to my ADSL Router via Telnet (the command after you're in telnet is "o router-web-configuration-ip-here") and then I issued the commands to check NAT loopback ("ip nat l"), after verifying it was off I issued the command to turn it on ("ip nat l on"). You can also edit the autoexec.net ("sys edit autoexec.net", "n" [twice], "ip nat l on", "x" ) of the router to make the change permanent.

I also did edit the HOSTS in my machine, placing my server's own local IP tied to the DynDNS host.

I'm using Windows 7 for development, I don't know about your specific configuration, but this might help others doing SO/HO dev.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号