Broadband-Hamnet™ Forum :: Problems & Answers
Welcome Guest   [Register]  [Login]
 Subject :Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-01-10- 14:16:14 
AE5CA
Member
Joined: 2012-05-19- 21:52:33
Posts: 81
Location

A friend of mine has a weather station setup on a Raspberry Pi.  He wants to have the webpage available on the mesh and the internet.  We have have the Rpi connected to a lan port of his mesh node. We have an ethernet cable connected between his home router connecting to the WAN port of the mesh node.  We can connect his rpi directly to the router and get it work on the internet.  We can get it to work on the mesh.

What I can't seem to make happen is port forward WAN port 80 to the RPI port 80.  I believe there is a firewall setting on the mesh node that is blocking port 80.

What is the best way to open up port 80 for forwarding?

Clint, AE5CA

IP Logged
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-05-08- 13:32:56 
WB0NIU
Member
Joined: 2014-05-07- 21:44:09
Posts: 11
Location
I am trying something similar. In this case it's a TeamSpeak3 server on a PC attached to the LAN port. I have forwarded port 9987: "Both Both 9987 172.27.0.5 9987". Like AE5CA, I can connect to the server from another node on the mesh, but not via the WAN port. Every other combination of equipment (PC connected directly to my local lan, local client, etc.) works. Any suggestions? Thanks, Erik, WB0NIU
IP Logged
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-23- 10:18:36 
kg7dgh
Member
Joined: 2013-05-09- 15:54:30
Posts: 9
Location
Any update here? I see the same problem in firmware 1.1.2... no form of WAN forwarding will work, not NAT or direct connect, listed ports or DMZ.
IP Logged
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-23- 10:52:32 
AE5CA
Member
Joined: 2012-05-19- 21:52:33
Posts: 81
Location

Ticket 48 was written to address this issue.  It looks like it is still present in 1.1.2. 

I can confirm that I have been able to forward port 80 to the wan using a Rocket M2 and a Netgear GS105E or GS108E Ethernet switch with the switch programmed to tag the WAN Connection as VLAN 1 before continuing on to the Rocket. 

My friend that had the original problem has since switched to a NanoStation M2 and he is also able to port forward to Port 80.

I believe this is just a matter of adding the right line in iptables but I am not 100% sure of the command. 

Clint, AE5CA

IP Logged
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-23- 12:46:29 
kg7dgh
Member
Joined: 2013-05-09- 15:54:30
Posts: 9
Location
Clint, where are tickets and where can I go to collaborate on the code for bbhn?
IP Logged
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-23- 15:00:46 
K6AH
Member
Joined: 2012-03-05- 10:47:45
Posts: 181
Location: San Diego, CA
We are still working on the repo, but the bug tracking can be found at: http://ubnt.hsmm-mesh.org/ Andre, K6AH
IP Logged
Member of:
Beta Test Team
San Diego Mesh Working Group
Running 3.0.1
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-26- 18:15:16 
kg7dgh
Member
Joined: 2013-05-09- 15:54:30
Posts: 9
Location

I would like to help but without a repo or a way to ssh in to the router I feel stuck. (stock 1.1.2 has no space to add the openssh-server package even on the 8mb wrt54gs). I have an nfs server I could attach to for space to develop in if there were a way.

IP Logged
Last Edited On: 2014-07-26- 18:26:50 By kg7dgh for the Reason
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-26- 18:31:01 
K6AH
Member
Joined: 2012-03-05- 10:47:45
Posts: 181
Location: San Diego, CA
The repo is now available. See the post: http://www.broadband-hamnet.org/hsmm-mesh-forums/view-postlist/forum-3-firmware/topic-1057-bbhn-source-repository.html#ccbp4700 Also, not sure why you can't SSH. Perhaps you're not using port 2222. Lastly, not much dev work going on with WRT54Gx platform other than keeping it compatible with our Ubiquiti work. Andre, K6AH
IP Logged
Member of:
Beta Test Team
San Diego Mesh Working Group
Running 3.0.1
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-26- 20:19:02 
kg7dgh
Member
Joined: 2013-05-09- 15:54:30
Posts: 9
Location

Andre, yes exactly I didn't get that dropbear was already on 2222. For now I use 5-host direct and put my node in /etc/config/local, just noticed it can get overwritten :(

iptables -t nat -A prerouting_wan -j DNAT --to (ip)

iptables -A forwarding_wan -d (ip) -j ACCEPT

IP Logged
Last Edited On: 2014-07-26- 20:21:06 By kg7dgh for the Reason
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-27- 15:01:38 
AE6XE
Member
Joined: 2013-11-05- 00:09:51
Posts: 116
Location

Here are the iptable commands I use (on the gateway node). Your home router also needs to forward, in this example, port 8088 to your hamnet gateway node. As a live example, feel free to try out and access a remote control pan-tilt ipCam looking over Orange County, CA on this link (I reserve the right to change the password :) ). This access is over a 5 mile 2.4G link into the mesh. Note, "IR" mode icon to click and turn on if night time.

http://72.194.78.152:8088 <- User = "view" Password = "view" requires Windows Plugin http://72.194.78.152:8081 <- To see mesh status of node

[linksys-host:/etc/config/firewall.user]

iptables -A input_wan -p tcp --dport 8085 -j ACCEPT

iptables -t nat -A prerouting_wan -p tcp --dport 8085 -j DNAT --to 10.182.194.173:80

iptables -A forwarding_wan -p tcp --dport 80 -d 10.82.194.173 -j ACCEPT

iptables -t nat -A postrouting_wan -p tcp -d 10.82.194.173 -j SNAT -dport 80 --to-source <your gateway node's mesh IP address>

[ubnt-host:/etc/config/firewall]

config 'redirect'

option 'name' 'cam1'

option 'src' 'wan'

option 'proto' 'tcp'

option 'src_dport' '8088'

option 'dest_ip' '10.182.194.173'

option 'dest_port' '80'

option 'target' 'DNAT'

option 'dest' 'lan'

config 'redirect'

option 'src' 'lan'

option 'dest' 'wifi'

option 'dest_ip' '10.182.194.173' 

option 'src_dip' '<your gateway node's mesh IP address>'

option 'dest_port' '80'

option 'target' 'SNAT'


Note, the SNAT entries are needed so that the device "inside the mesh" (this doesn't have to be a device on the gateway node) will route the traffic back out the same gateway. In this live example, we have multiple gateways. Routers by default typically won't allow internet traffic to come in one gateway and back out another--a security issue.

To ensure your entries don't get overwritten, also put these definitions in /etc/config.mesh files.

IP Logged
Last Edited On: 2014-07-28- 04:14:52 By AE6XE for the Reason another formatting correction
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-28- 02:12:01 
AD7QF
Member
Joined: 2012-04-16- 05:51:12
Posts: 23
Location
http://72.194.78.152 is not reachable at this time. Check the date and time of this message to see when this occurred.
IP Logged
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-28- 04:07:09 
AE6XE
Member
Joined: 2013-11-05- 00:09:51
Posts: 116
Location
Your timing was within minutes of an automatic crontab reboot at 6AM localtime. It takes a half day's climb-hike to get to this equipment round trip. A nightly OS reboot has saved a couple trips already. Also, make sure you are typing in the full IP and port # in the browser address using port 8088. This is my home Cox IP open internet address and there is no port 80 services defined.
IP Logged
 Subject :Re:Port Forwarding WAN port 80 to Rpi webserver attached to node.. 2014-07-28- 11:21:16 
AD7QF
Member
Joined: 2012-04-16- 05:51:12
Posts: 23
Location

Thank you for the explanation. I know that the correct IP:port was being used, as it was a cut and past. Just finished working the camera and exploring the status with the same access as before and all is well. I enjoy what you have done.

That is quit the high tech temperature probe being used. I hope that it is sun exposure creating a 120 deg + reading and is not the ambient air temperature.

IP Logged
Last Edited On: 2014-07-28- 11:26:15 By AD7QF for the Reason post script
Page # 


Powered by ccBoard


SPONSORED AD: