hello together
my raspberry pi makes an internet connection via 3G USB stick. the ip camera is connected via ethernet. I would like to access from the external ip on the webinterface of the camera.
I tried my ip webcam (eth0) via gsm (ppp0) to achieve. internally to ping (ipwebcam 192.168.1.42) works!.
must I put up any iptables rules to 192.168.1.42:8080 is reachable?
ipwebcam (192.168.1.42) => eth0 (192.168.1.1) => ppp0 (extIP)
I want to access the webinterface of the webcam extIP: 8080.
is that even possible?
cheers, thanks for your help and
gadjo
it works now:
sudo iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source "extIP"
sudo iptables -t nat -A PREROUTING -p tcp --dport 8080 -d "extIP" -i ppp0 -j DNAT --to-destination 192.168.1.42:8080
sudo iptables -t nat -A POSTROUTING -p tcp --dport 8080 -d 192.168.1.42 -o ppp0 -j SNAT --to-source "extIP"