Page 1 of 1

MeteoBridge and using a different port for http **solved**

Posted: Thu Nov 21, 2013 11:10 am
by ctann
Hi,

New MeteoBridge user here. Loving it so far!

I ran into a problem with remote access to my MeteoBridge. I am using a Sprint Wireless hotspot for serving up my weather data, and I want to be able to reach the MeteoBridge from the internet. After some playing around and some frustration, it seems that my service provider is blocking port 80 in some manner. Although I set up port-forwarding in my router to forward port 80 to the MeteoBridge, that doesn't work.

To test this out, I set up an apache server hooked up to the router, and forwarded port 80 there instead. Same problem, no connection over port 80. However, when I moved that server to port 8080, and tried to access over that port, it worked fine - thus my conclusion that just port 80 is getting blocked.

So, after that lead-in - is there any way to change the MeteoBridge to port 8080 instead of just port 80? I did some online research, and found lots of cases of people doing that with MeteoHub, and OpenWRT, but I'm not sure what is possible on the MeteoBridge. Although I might be able to get my provider to open up port 80, I would much rather use a different port anyway. Unfortunately my router only does straight port forwarding, and not port redirection...

So, any clues? I am more than happy to hack code, just need a little nudge in the right direction. I have been playing around with the Linux installation on the MeteoBridge, specifically the firewall settings, but I don't even know if I am on the right track...

Cheers,
Chris.

Re: MeteoBridge and using a different port for http

Posted: Thu Nov 21, 2013 11:36 am
by ctann
Answering one's own questions may be a sign of insanity, but I am pleased to report I got it working! :-) Just took a little digging around with Open WRT, and I found the magic recipe. *disclaimer* - I got it working, but that doesn't mean that it will work for you!

So, here is what I did (from a terminal on a Mac). My MeteoBridge's IP address is 192.168.1.100. If you don't know vi, its time to learn! Or I guess you could step into the modern age and use one of these new-fangled editors... :P

ssh meteobridge@192.168.1.100
<password>
cd /etc/config
vi firewall

At the end of the file, add the following:

Hack for ports.
/etc/config/firewall

config redirect
option src wan
option src_dport 8080
option dest lan
option dest_ip 192.168.1.100
option dest_port 80
option proto tcp


Simple as that! I did a "restart firewall" from within the advanced settings/status/firewall tab, and it worked just fine. Seems to survice a re-boot too, so I think I'm all good :D

Cheers,
Chris.

Re: MeteoBridge and using a different port for http *SOLVED*

Posted: Thu Nov 21, 2013 9:14 pm
by admin
I would always prefer no to change the port but to use the routers feature to map port 8080 on WAN interface to port 80 of meteobridge LAN IP when configuring port forwarding. This is imho the much better way of dealing with it. When your router doesn't allow that, dump the router ;-)

Changes on config files might be overwritten next time you press "save" on certain Meteobridge screens.

Re: MeteoBridge and using a different port for http *SOLVED*

Posted: Fri Nov 22, 2013 6:03 am
by ctann
admin wrote:I would always prefer no to change the port but to use the routers feature to map port 8080 on WAN interface to port 80 of meteobridge LAN IP when configuring port forwarding. This is imho the much better way of dealing with it. When your router doesn't allow that, dump the router ;-)
Yup, that would be my preference as well. In this case, though, the router functionality is built into the Wireless Hotspot provided by the phone company, and is limited to straight forwarding with no re-mapping. Yes, that is a restriction I am not used to... This is for a remote monitored setup, so I don't have too many options (for example, I don't want to set up a more flexible router behind the wireless Hotspot, as that is kind of overkill....).

The choice of Wireless Hotspots is pretty sparse. I picked a Netgear "Zing", as it is the only one with external antenna jacks, which may be a necessity given where my weatherstation is located.

Cheers,
Chris.