Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an interesting problem that involves multiple GoPro cameras. Basically, I need to have the ability to communicate with multiple GoPro cameras via a single network. The challenge is that the cameras operate as a WiFi access point and all have the same IP address once connected (10.5.5.9).

In order to allow my to access all of the cameras via a single network, I'm planning on using a unique WiFi adapter for each camera. This should work well since each camera has a unique SSID. Each WiFi adapter would have a unique address in the 10.5.5.0 subnet. The challenge arrises once more than one of the WiFi adapters connects to a camera and I now have multiple devices with the 10.5.5.9 IP address.

From here, I'm thinking that it may be possible to configure some IPTables rules to enable port forwarding to the specific WiFi interfaces.

Assuming the routing system had an eth0 with multiple IP address (192.168.1.1, 192.168.1.2, etc), would it be possible to create IPTables rules to perform the following?

  • Forward traffic received on 192.168.1.N:80 to 10.5.5.9:80 (via wlanN)
  • Forward traffic received on 192.168.1.N:8080 to 10.5.5.9:8080 (via wlanN)

Thanks!

share|improve this question

1 Answer 1

You're looking for something like:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 10.5.5.9:80

However as each of your wifi adapters has the same IP this won't work because your routing table will be fubar.

To get this working you need to force each wifi adapter to have a unique address on the 10.5.5.0 network and then also set up your routing appropriately:

route add -host <CAMERA IP> gw <WLAN INTERFACE ADDRESS> dev <WLAN INTERFACE DEV>

You'd setup each interface something like so:

ifconfig wlan0 <WLAN IF ADDR> -pointopoint <CAMERA ADDR>

And that should setup the route for you, if not use the "route" command above.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.