Changes

Jump to: navigation, search

Tung httpd conf

587 bytes removed, 18:29, 27 July 2011
no edit summary
<b><big><big>Installing ==Running and Configuring Firewall</big></big></b>Apache Server==
<b><big>Introduction</big></b>
<font face="Georgia">In this page, you are going to set up a Apache server and allow a user create a firewall that allows only outside world view the his own personal web page in your server.
</font>
 <b><big>Instruction</big></b>===Creating a Public Web Page===#Login as root user#Clear up Configure the Apache server to start when the rules in your iptablesFedora is booted: <b><code><font color=green >iptables -F</font></code></b>chkconfig httpd on#Change Start the input chain default policy to dropApache server: <b><code><font color=green >iptables -P INPUT DROP</font></code></b>service httpd start#Create a rule that allow outside to access http port only: <b><code><font color=green >iptables -I INPUT -p tcp --dport http -j ACCEPT<index.html in /var/www/font><html/directory, write some html code></b>in the file#Change the input chain default policy to dropOpen a browser, and enter http: <b><code><font color=green >iptables -P OUTPUT DROP</font></code></b>localhost. Your page should display.#Create a rule that allow packets to output from http port onlyMake web page accesses by other hosts: <b><code><font color=green > iptables -I OUTPUT INPUT -p tcp --sport dport http -j ACCEPT</font></code></b>#View your web page from other virtual machine. The web page should be displayed.#Try to <b>ssh</b> and <b>ping</b> from virtual machine to your server. All connections should be blocked.#Save your iptables rules: <b><code><font color=green >service iptables save</font></code></b>
1
edit

Navigation menu