You can create link
Code:
ln -s /var/ftp/pub/RHEL6_X86_64 /var/www/html/RHEL
Now you will be able to access it and also new files that you put into /var/ftp/pub/RHEL6_X86_64 directory using http if http service is running, using
http://http_server_ip/RHEL
For testing just create a test file
Code:
seq 1000 > /var/ftp/pub/RHEL6_X86_64/1k.txt
if required restart the http service, but not necessary.
Code:
/sbin/service httpd restart
Now you will be able to access from browser.
Code:
http://http_server_ip/RHEL/1k.txt
ftp://ftp_server_ip/pub/RHEL6_X86_64/1k.txt
To Block particular host
Code:
iptables -I INPUT 1 -s ip_address -p tcp --dport 80 -j DROP
Or for example to reject 192.168.1.2
Code:
iptables -I INPUT 1 -s 192.168.1.2 -p tcp --dport 80 -j REJECT
To allow particular host
Code:
iptables -I INPUT 1 -s ip_address -p tcp --dport 80 -j ACCEPT