Well both reverse proxy and port forwarding looks for any incoming packets destined to a particular machine which is present in local network. How both of them are different ?
Port forwarding describes a layer-4 mechanism, operating on TCP connections or UDP packets without necessarily understanding the application data.
Reverse proxy suggests a higher-layer (this is where the OSI model doesn't map directly to TCP/IP) application-aware proxy. In the old days, a proxy server was most commonly used between users and the Internet; so reverse indicates the other way around, used to proxy traffic from the Internet to server(s).
While both methods might look similar, they are entirely different technically.
A proxy accepts a socket connection and fulfills the client request in some way or other. Usually, it creates its own request to the indicated server.
The by far most common example is an HTTP proxy that accepts HTTP requests from clients, uses its own HTTP request to retrieve the page/object, and then forwards the data to the client. Proxies can even translate application layer protocols (e.g. FTP over HTTP proxy) but they are always application-specific which makes them application-aware as well. Proxies were widely used for private-to-public Internet access before NAT become common. They can also be used for caching or deeper insight into the application protocol (application-layer gateway, malware scan, content filtering, ...).
A reverse proxy is used the other way around: public access for servers within private LANs. Since a proxy understands the application protocol, it can be used as a single entry point for multiple exposed servers, especially with HTTP. A reverse proxy can have multiple functions, including
- load balance across a number of backing servers
- port sharing (multiple web servers are accessed using the same public IP address and transport-layer port number, distinguished by host header)
- offloading SSL to the proxy
- application-layer gateway/filtering
Port forwarding is another term for destination NAT aka reverse NAT, sometimes also virtual IP: a router translates a packet's public destination address to the actual private address to enable access from the Internet to privately addressed servers. In contrast to a proxy, a NAT router is not aware of the application protocol that's currently used. It only translates IP addresses and possibly transport-layer (L4) port numbers.
That way, it isn't possible to enable public access to multiple private servers using a single public IP address and L4 port - you need to either have multiple public addresses or use multiple ports.
Reverse proxy help the client traffic from outside networks towards servers deployed in internal networks to distribute load equally on backend servers . Basically reverse proxy is inducted behind firewall and more than one back end servers are connected to reverse proxy .
Portforwarding is a technical term used in networking . When the client wants to access server deployed behind firewall on specific service ports . As server is behind firewall client can't reach server beacuse of restriction in firewall . To allow this connection port opening is required from client IP address to server IP address on specific ports this policy Configure in firewall is referred as port forwarding.