User26401 1 Posted ... Hi All, I run Tomato firmware on Asus router. I have two Hikvision camera I want to remote view, is this how I'd go about it: 1) On AirVPN Client Area, forward two ports e.g. my-cam-name port 8001&2 forward to (my vpn IP) port say 10001&10002 2) In router, set up IP tables like so iptables -I FORWARD -i tun1 -p udp -d 192.168.1.2 --dport 10001 -j ACCEPTiptables -I FORWARD -i tun1 -p tcp -d 192.168.1.2 --dport 10001 -j ACCEPTiptables -t nat -I PREROUTING -i tun1 -p tcp --dport 2001 -j DNAT --to-destination 192.168.1.2iptables -t nat -I PREROUTING -i tun1 -p udp --dport 2001 -j DNAT --to-destination 192.168.1.2 Now my PC listens on Ports 2001&2 ? How do I access from the outside web using ddns? Is it my-cam-name.airvpn.org:8001 Any info much appreciated! Quote Share this post Link to post
User26401 1 Posted ... Solved (well the networking side) this myself, posted here in case it helps other people or you land here from a search. 1) Grab the port number(s) you want and a ddns name so you can access it by name not IP (also if you change vpn server) let's say 12345 and mycamera1 2) Your camera has an internal IP of 192.168.1.50 and listens on port 80 3) On Tomato, VPN is tun11, check this is enabled for forwarding by running this command, it should return 1: cat /proc/sys/net/ipv4/conf/tun11/forwarding if not you need to enable by typing echo '1' | sudo tee /proc/sys/net/ipv4/conf/tun11/forwarding 4) Put these in your routers Settings/Administration/Scripts/Firewall (first one was already there, is a killswitch) iptables -I FORWARD -i br0 -o `nvram get wan_iface` -j DROP iptables -I FORWARD -i tun11 -p udp -d 192.168.1.50 --dport 80 -j ACCEPT iptables -I FORWARD -i tun11 -p tcp -d 192.168.1.50 --dport 80 -j ACCEPT iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 12345 -j DNAT --to-destination 192.168.1.50:80 iptables -t nat -I PREROUTING -i tun11 -p udp --dport 12345 -j DNAT --to-destination 192.168.1.50:80 You can now acess it from a browser here http://mycamera1.airdns.org:12345 If you have more than one camera, then you just grab extra port numbers (12346, 12347, ...) and ddns (mycamera2, mycamera3, .. ) and forward to each internal I.P. (192.168.1.51, 192.168.1.52, .. ) all can listen on port 80. Enjoy! 1 LZ1 reacted to this Quote Share this post Link to post