Web Server Proxy configuration using xinetd in Linux

Posted: 21 Mar 2019 in SERVER
Tags: , , , ,

Learn to configure Proxy Server for your Web Server using xinetd. We are going to learn how to configure proxy server for any Web Services using xinetd in Linux. Here in this Article The Proxy Machine I have used is a RHEL5 Machine and I will show you in just few simple steps that how easily you can configure a Proxy server on your RHEL5 machine using XINETD.

As you can see in above image will be our Web server on which we will configure HTTP Apache Server. will be our Proxy Server(HTTP PROXY) which will works on PORT 81 Our Windows Machine used here as Client.This machine will be used for Testing of Proxy server.


Understand Proxy Server Working:

From above Diagram you can easily Understand the Functioning of Proxy Server.If you are using Proxy server  which is in our case which will work on PORT 81 will hide the IP Address of Server From Clients and at the same time it will hide the IP address of Clients From Server.

Whenever client wants to visit web site hosted on web server which by default work on PORT 80 have to type the ip address of proxy server where 81 is the proxy port. It means whenever a request comes to for PORT 81 it will be redirected to port 80 which is our Web Server where we have hosted our website.


Does Client Need to Know the Web Server Address or IP Address of Your web server to open your website?

Answer: NO !


Then How will Client Visit the web Site hosted on YOUR web server ?

Answer: Clients will just visit the ip address of Proxy server with PORT Number.

in our case if You are using Linux Machine the type below command.

If You are using a Windows Machine,linux Machine,Android or any other OS and you are using any Browser the you can open in this way. see below image.

web proxy output

Now Configuration on Proxy server

#yum install xinetd* -y

#vim /etc/xinetd.d/http-switch


proxy configuration file

#service xinetd restart

#chkconfig xinetd on

#iptables -F

#setenforce 0


configuration on Web server

#yum install httpd* -y

#cd /var/www/html

#echo "just testing web page for proxy server" > index.html



After this Run the HTTP Service and check firewall status

http service

Now go to Windows Client Machine

We are going to  Test HTTP Proxy is working or not.

web proxy output

You can see I have just typed the IP ADDRESS of Proxy Server with PORT 81 and it has open the web pages that is hosted on web Server


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.