On Thu, Dec 9, 2010 at 4:46 PM, Dattatray Kamble meet2dsk@gmail.com wrote:
Hi,
I am in trouble while writing PAT rule in my iptables configuration.
Lan ips - 192.168.2.0/24 Public ip - y.y.y.y
I need to implement PAT for ssh ---> At ip - y.y.y.y port - 1 should redirect to 192.168.2.1:22 At ip - y.y.y.y port - 2 should redirect to 192.168.2.2:22 At ip - y.y.y.y port - 3 should redirect to 192.168.2.3:22
please let me know how to resolve it..!
What you are trying to do is fairly simple.
You have not mentioned what distribution/version you are using.
Also, what have you have searched [1] and read and tried to implement by yourself?
I suggest that you buy the "The Linux Networking Cookbook" by Carl Schroder (O'Reilly/Shroff Publications). She has put together several examples of doing such things - IMO a must on any system/network admin's desk.
[1] http://lmgtfy.com/?q=iptables+pat
HTH -- Arun Khan