Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I map ports on my public ip to private ips?

Status
Not open for further replies.

john99999

Instructor
Apr 29, 2005
73
US
How can I map ports on my public ip to private ips?

I have a linux firewall/router running ip tables with and ip of xx.45.123.90
and 4 internet cameras on the public network at ips
10.10.0.100
10.10.0.101
10.10.0.102
10.10.0.103

how can i map
to 10.10.0.100
to 10.10.0.101
to 10.10.0.102
to 10.10.0.103
 
iptables -A PREROUTING -t nat -i [external interface] -p [tcp/udp] -d xx.45.123.90 --dport 2000 -j DNAT --to-destination 10.10.0.100:2000
iptables -A FORWARD -i [external interface] -p [tcp/udp] -d 10.10.0.100 --dport 2000 -j ACCEPT

replace text in intalics to what every suits your environment.


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top