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

Posted on in Categories , , last updated March 18, 2008

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 192.168.1.100 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.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Leave a Comment