iptables port forwarding on CPD
- This topic has 1 reply, 2 voices, and was last updated 14 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › MultiConnect OCG › iptables port forwarding on CPD
Tagged: CPD, iptables, portforwarding
Hi,
Want to connect to a camera connect to a CPD and access the camera over a wireless GSM network. Want to port forward packets coming into my GSM fixed IP address to the camera with addressable to the CPD over the LAN.
This website shows an example using iptables and MASQUERADE. Wonder if there is a good port forwarding example.
I have tried opening up the permissions and using the rule:
iptables -A PREROUTING -t nat -d 166.30.11.22 -i ppp0 -j DNAT –to 192.168.1.212
Thanks in advance.
James
Two things:
You probably want to specify the specific port that should be forwarded in your rule and possibly the protocol (UDP/TCP). Also, the “–to” option I believe should be “–to-destination”.
Example using port 80 for TCP:
iptables -t nat -A PREROUTING -p tcp -d 166.30.11.22 –dport 80 -j DNAT –to-destination 192.168.1.212