Jump to content


Problem with Static NAT


  • Please log in to reply
2 replies to this topic

#1 axilimi

axilimi

    Member

  • Members
  • PipPip
  • 106 posts

Posted 04 October 2011 - 01:03 AM

Dear all,

This is my topology:

PC ------------ (eth0) LINUX router (eth1)--------Internet

Please help me with the configuration of Static NAT. I have a server from local network (IP@: 192.168.1.2/24).
I wanna configure static NAT sothat someone from the Internet can connect to my server.

On LINUX router:

iptables -t nat -A POSTROUTING -s 192.168.1.2 -o eth1 -j SNAT --to-source <Public IP>
iptables -t nat -A PREROUTING -d <Public IP> -i eth1 -j DNAT --to-destination 192.168.1.2


BUT It didn't work. Please point out my fault and how can I resolve it?

Thank you very much.

#2 axilimi

axilimi

    Member

  • Members
  • PipPip
  • 106 posts

Posted 04 October 2011 - 10:33 PM

Oh, I resolved this problem.
Thank you.

#3 Muhammad Abid Adnan

Muhammad Abid Adnan

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 03 September 2012 - 07:18 PM

Dear all,

This is my topology:

PC ------------ (eth0) LINUX router (eth1)--------Internet

Please help me with the configuration of Static NAT. I have a server from local network (IP@: 192.168.1.2/24).
I wanna configure static NAT sothat someone from the Internet can connect to my server.

On LINUX router:

iptables -t nat -A POSTROUTING -s 192.168.1.2 -o eth1 -j SNAT --to-source <Public IP>
iptables -t nat -A PREROUTING -d <Public IP> -i eth1 -j DNAT --to-destination 192.168.1.2


BUT It didn't work. Please point out my fault and how can I resolve it?

Thank you very much.


Follow the steps at the link http://www.ittechguru.net/?p=21





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users