Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torgeir/1b5747fb373e3067750abc0074526f88 to your computer and use it in GitHub Desktop.
Save torgeir/1b5747fb373e3067750abc0074526f88 to your computer and use it in GitHub Desktop.
Connect wireless gopro to wireless router with two network interfaces

Connect wireless gopro to wireless router with two network interfaces

For a wireless router on 192.168.1.1 with two network interfaces, e.g. wlan0 and wlan1, you can expose your gopro's live stream on a port on the router using the following setup.

Connect your machine to wlan0, ssh to your router 192.168.1.1, and run these iptables rules.

iptables -t nat -I PREROUTING -d 192.168.1.1 -j DNAT --to-destination 10.5.5.9 -p tcp --destination-port 8080
iptables -t nat -I POSTROUTING -s 10.5.5.9 -j SNAT --to-source 192.168.1.1 -p tcp --destination-port 8080
iptables -I POSTROUTING -t nat -o wlan0 -j MASQUERADE
iptables -I POSTROUTING -t nat -o wlan1 -j MASQUERADE

Connect the router's wlan1 to your gopro's network (the gopro's ip address will be 10.5.5.9). The iptables rules will expose your gopro live stream on your wifi router @ 191.168.1.1:8080.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment