> You could create virtual or dummy interfaces

Unfortunately the cameras don't appear to support IPv6. This is not
production, just me trying to prove that our library will cope OK with
multiple cameras.

So I tried the following...
--
#!/bin/bash

# Ensure that NAT is enabled
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward

# For each of the WLAN interfaces (map wlan0 -> camera0)
# Camera presents webserver on:
# http://10.0.0.1:10000/sony/camera

ip li add camera0 type dummy
ip link set camera0 up
ip addr add 192.168.0.1/24 dev camera0

iptables -t nat -A POSTROUTING -o camera0 -j MASQUERADE
iptables -A FORWARD -i wlan0 -o camera0 -j ACCEPT
iptables -A FORWARD -i camera0 -o wlan0 -m state --state
RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i camera0 -p tcp -d 10.0.0.1 --dport 10000 -j ACCEPT
--

I was (still) able to browse to 'http://10.0.0.1:10000/sony/camera', but
when I tried 'http://192.168.0.1:10000/sony/camera' I got nothing - and
tcpdump on the wlan0 interface showed no traffic.

Simon



_______________________________________________
clug-talk mailing list
clug-talk@clug.ca
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to