Red Hat LINUX VIRTUAL SERVER 4.6 - ADMINISTRATION Manuale di Installazione Pagina 204

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 296
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 203
184 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0
3. Go back to your browser and click Refresh. You should get an error that the server is not
responding (or Unable to connect). This is because the packets for the http: and https:
ports (80 and 443) are dropped by default.
4. To allow web traffic through, you can modify the /etc/sysconfig/iptables file. First,
make a backup copy, add two rules (in bold) to allow these ports, and save your changes:
# cd /etc/sysconfig
# cp iptables iptables.orig
# vi iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
5. Restart the firewall to enable the new rules:
# service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
6. Go back to your browser and click Refresh again. You should not get an error this time.
You should now have a firewall that allows web traffic.
11.1.4 Configuring SSL for Apache
Use the Secure Sockets Layer (SSL) to encrypt data between the client (browser) and the
server. This is done by specifying an https prefix in the URL, which uses port 443 rather than
using the conventional http prefix, which uses port 80.
Perform the following steps:
1. To use SSL, you must use the mod_ssl package. You can demonstrate that SSL
communication do
not work by changing http to https in the URL entered into your
browser:
https://9.60.18.224/
You should see a communications error.
2. Install the mod_ssl RPM using the yum -y install command:
# yum -y install mod_ssl
...
Installed:
mod_ssl.s390x 1:2.2.15-5.el6
Complete!
Vedere la pagina 203
1 2 ... 199 200 201 202 203 204 205 206 207 208 209 ... 295 296

Commenti su questo manuale

Nessun commento