La sécurité sous serveur proxy sous redhat

Fermé
ahmed_rhce Messages postés 4 Date d'inscription jeudi 23 octobre 2008 Statut Membre Dernière intervention 18 février 2009 - 20 nov. 2008 à 14:26
ahmed_rhce Messages postés 4 Date d'inscription jeudi 23 octobre 2008 Statut Membre Dernière intervention 18 février 2009 - 20 nov. 2008 à 14:33
Bonjour,
les ami je pense que la solution pour faire un serveur sécurisé sous frdora core 4 la solution c'est edité le fichiér suivant ok ok ok les ami

*** IP filtering setup (IPFWADM)
If you are using kernel 2.1.102 or newer skip to the next section on IPCHAINS.
In older kernels IP Forwarding is turned on by default in the kernel. Because of this, your network should
start by denying access to everything and flushing any ipfw rules in place from the last time it was run. This
script fragment should go in your network startup script. (/etc/rc.d/init.d/network)
#
# setup IP packet Accounting and Forwarding
#
# Forwarding
#
# By default DENY all services
ipfwadm −F −p deny
# Flush all commands
ipfwadm −F −f
ipfwadm −I −f
ipfwadm −O −f
Now we have the ultimate firewall. Nothing can get through.
Now create the file /etc/rc.d/rc.firewall. This script should allow email, Web and DNS traffic through. ;−)
#! /bin/sh
Firewall and Proxy Server HOWTO
**** IP filtering setup (IPFWADM)
#
# rc.firewall
#
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
exit 0
fi
case "$1" in
start)
echo −n "Starting Firewall Services: "
# Allow email to got to the server
/sbin/ipfwadm −F −a accept −b −P tcp −S 0.0.0.0/0 1024:65535 −D 192.1.2.10 25
# Allow email connections to outside email servers
/sbin/ipfwadm −F −a accept −b −P tcp −S 192.1.2.10 25 −D 0.0.0.0/0 1024:65535
# Allow Web connections to your Web Server
/sbin/ipfwadm −F −a accept −b −P tcp −S 0.0.0.0/0 1024:65535 −D 192.1.2.11 80
# Allow Web connections to outside Web Server
/sbin/ipfwadm −F −a accept −b −P tcp −S 192.1.2.* 80 −D 0.0.0.0/0 1024:65535
# Allow DNS traffic
/sbin/ipfwadm −F −a accept −b −P udp −S 0.0.0.0/0 53 −D 192.1.2.0/24
;;
stop)
echo −n "Stooping Firewall Services: "
ipfwadm −F −p deny
;;
status)
echo −n "Now do you show firewall stats?"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: firewall {start|stop|status|restart|reload}"
exit 1
esac


ok ok ok ok ok ok ok les ami ton ami ahmed enginner certified redhat

1 réponse

ahmed_rhce Messages postés 4 Date d'inscription jeudi 23 octobre 2008 Statut Membre Dernière intervention 18 février 2009
20 nov. 2008 à 14:33
(/etc/rc.d/init.d/network)
#
# setup IP packet Accounting and Forwarding
#
# Forwarding
#
# By default DENY all services
ipfwadm −F −p deny
# Flush all commands
ipfwadm −F −f
ipfwadm −I −f
ipfwadm −O −f
Now we have the ultimate firewall. Nothing can get through.
Now create the file /etc/rc.d/rc.firewall. This script should allow email, Web and DNS traffic through. ;−)
#! /bin/sh
Firewall and Proxy Server HOWTO
*****IP filtering setup (IPFWADM)
#
# rc.firewall
#
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
exit 0
fi
case "$1" in
start)
echo −n "Starting Firewall Services: "
# Allow email to got to the server
/sbin/ipfwadm −F −a accept −b −P tcp −S 0.0.0.0/0 1024:65535 −D 192.1.2.10 25
# Allow email connections to outside email servers
/sbin/ipfwadm −F −a accept −b −P tcp −S 192.1.2.10 25 −D 0.0.0.0/0 1024:65535
# Allow Web connections to your Web Server
/sbin/ipfwadm −F −a accept −b −P tcp −S 0.0.0.0/0 1024:65535 −D 192.1.2.11 80
# Allow Web connections to outside Web Server
/sbin/ipfwadm −F −a accept −b −P tcp −S 192.1.2.* 80 −D 0.0.0.0/0 1024:65535
# Allow DNS traffic
/sbin/ipfwadm −F −a accept −b −P udp −S 0.0.0.0/0 53 −D 192.1.2.0/24
;;
stop)
echo −n "Stooping Firewall Services: "
ipfwadm −F −p deny
;;
status)
echo −n "Now do you show firewall stats?"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: firewall {start|stop|status|restart|reload}"
exit 1

okok okok oko **************************************ingénieur ahmed
esac
0