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
.