Iptables config for wan:8888 to lan:80 on Amazon EC2
Right now i have configured 2 interfaces on my Amazon EC2 instance and i've opened 7999-8999 ports from web interface:
eth0 Link encap:Ethernet HWaddr 12:31:38:04:C0:75
inet addr:10.220.195.131 Bcast:10.220.195.255 Mask:255.255.254.0
As far as i've read Amazon does NAT 1:1, converting my real ExternalIP into 10.220.195.131.
ham1 Link encap:Ethernet HWaddr 00:23:C3:E1:07:8E
inet addr:192.168.1.108 Bcast:192.168.1.255 Mask:255.255.255.0
I can ping in internet and also in 192.168.1.1, and i'm interested how can i configure iptables in order to translate:
ExternalIP:8888 into 192.168.1.1:80
Please help me a bit cause i've tried different configurations and none of them worked until now.
For the start can you guys please tell me if i would need to use the ExternalIP in my iptables or 10.220.195.131 ?
Thanks a lot and happy holidays!