With the Listen and NameVirtualHost
directives, the Apache web server specifies the standard communication
ports associated with both the HTTP and HTTPS protocols, 80 and 443. To allow
external communication through the noted ports, you can set up both ports as
trusted services in the Firewall Configuration tool. Of course, for systems
where HTTP and HTTPS are configured on nonstandard ports, you’ll have to adjust
the associated iptables rules
accordingly. If you just open these ports indiscriminately, it allows traffic
from all systems. It may be appropriate to set up a custom rule to limit access
to one or more systems or networks. For example, the following custom rules
allows access to every system on the 192.168.122.0 network except the one with
IP address 192.168.122.150, over port 80. To review, these rules are applied to
the iptables command, in order.
-A INPUT -m state --state NEW -m tcp
-p tcp -s 192.168.122.150 --dport 80 -j REJECT
-A INPUT -m state --state NEW -m tcp
-p tcp -s 192.168.122.0/24 --dport 80 -j ACCEPT
Similar rules may be required for port
443. Of course, that depends on the
requirements of the job.
Excellent informative blog, keep for sharing.
Best System Integration services | Massil Technologies