NAT vs. port forwarding

17

5

Possible Duplicate: What is port forwarding and what is it used for?

What is the difference between NAT and port forwarding? Are they two different names for the same thing? What would be a short practical example?

Bunkai.Satori

Posted 2012-05-30T18:14:07.577

Reputation: 465

Question was closed 2012-06-04T20:20:43.063

2

possible duplicate of What is port forwarding and what is it used for? and/or Understanding port forwarding and NAT

– Ƭᴇcʜιᴇ007 – 2012-05-30T18:21:56.077

Answers

11

NAT and port forwarding are different, but they are often used in conjunction with each other.

NAT is network address translation. It translates traffic from one IP address to another. An example: NATing your WAN IP address 1.2.3.4 to your internal webserver 192.168.0.1.

Port forwarding (sometimes called PAT - Port Address Translation) is similar, but it functions on the port level. You can forward port 80 from your WAN IP address to your internal webserver, for example. You can also forward to a different port - i.e. port 8080 on the WAN is forwarded to port 80 on your internal web server.

Jim G.

Posted 2012-05-30T18:14:07.577

Reputation: 2 794

In which case will the IP get replaced? Because I have an exposed server in port 80 (im not the router's administrator) but the IP the log has is the gateway one. So I don't see the real IP of the request – JorgeeFG – 2015-05-13T15:53:40.790

2-1 What about NAPT? can you explain if NAPT is NAT with port forwarding? You've said that PAT is Port Forwarding, so that'd mean that NAPT is not NAT and that is false or very unclear at best. – barlop – 2016-01-20T15:29:32.397

I believe port forwarding and PAT are not the same. – Nikhil Girraj – 2018-02-15T08:03:52.060

+1 and thank you for very good explanation. i will mark this answer as the "accepted answer". – Bunkai.Satori – 2012-05-30T18:25:21.693

When you are forwarding WAP IP 1.2.3.4 to 192.168.0.1, don't you need any specific port to do the forwarding? – Zhenxiao Hao – 2014-05-25T01:09:54.357

Zhenxiao, normally you would specify a specific port or range of ports, but you can NAT all traffic from one IP to another. – Jim G. – 2014-05-27T16:07:43.307