≡ Menu

How To Run Linux Web Server / Service on Private IP Network

Q. I've only one public IP address assigned by my ISP using metro Ethernet connection. eth0 has public IP and eth1 is connected to our network switch. How do I configure Linux box to forward traffic to my web server hosted at IP address?

A. There are many ways to forward traffic from public IP to private IP:

[a] Use iptables to forward traffic between private and public IPs. You can route traffic to certain machines on a DMZ for HTTP, HTTPS or SMTP service.

[b] Use reverse proxy software such as pound. It accepts requests from HTTP / HTTPS clients and distributes them to one or more Web servers.