Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 09/08/2007, à 18:28

siks971

!!!PROB Mise en Place Proxy Squi!!!!

bonjour à tous,
je suis stagiaire à yvelines radio et je dois mettre en place un serveur proxy et ensuite gerer un server NAS.
Mon premier problème est la mise en place du serveur proxy squid!!
d'une station cliente et en entrant les paramètre du proxy je n'arrive pas a accéder au net.Surement a cause de bind que je n'arrive pas a configurer

J'utilise un seul pc comme serveur(qui contiendra tous les services reseau DHCP,DNS,etc), ce pc dispose actuellement de 2 cartes réseaux
-etho 192.168.0.200 est relié a la freebox 192.168.0.254
-eth1 192.168.10.254 est relié au réseau local de la radio
ma station cliente est 192.168.10.2

mon fichier squid.conf (peu etre un peu long lool) est le suivant :

-----------------------------------------------------------------------------------------------------------------
http_port 192.168.10.254:8080 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
access_log /var/log/squid/access.log squid
hosts_file /etc/hosts
refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern .        0    20%    4320
acl all src 0.0.0.0/0.0.0.0
# Definition acl pour notre reseau local
#
acl lan src 192.168.10.0/255.255.255.0
acl allowed_clients src 192.168.10.2
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443        # https
acl SSL_ports port 563        # snews
acl SSL_ports port 873        # rsync
acl Safe_ports port 80        # http
acl Safe_ports port 21        # ftp
acl Safe_ports port 443        # https
acl Safe_ports port 70        # gopher
acl Safe_ports port 210        # wais
acl Safe_ports port 1025-65535    # unregistered ports
acl Safe_ports port 280        # http-mgmt
acl Safe_ports port 488        # gss-http
acl Safe_ports port 591        # filemaker
acl Safe_ports port 777        # multiling http
acl Safe_ports port 631        # cups
acl Safe_ports port 873        # rsync
acl Safe_ports port 901        # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
# Ajout des droits
#
http_access allow lan
http_access allow allowed_clients
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
cache_effective_group proxy
coredump_dir /var/spool/squid
# Determination de l'utilisateur effectuant les requetes sur le serveur
cache_effective_user proxy
cache_effective_group proxy

# Emplacement de stockage des données et reglage des niveaux
cache_mem 16 MB
cache_dir ufs /var/spool/squid 1024 16 128
--------------------------------------------------------------------------------------------------------------------------------
MERCI DE VOTRE AIDE A L'AVANCE


Fan de musique? Je suis egalement music producer -> http://siks-music.blogspot.com, n'hesitez pas a vister mon blog Ubuntu http://2tibuntu.blogspot.com

Hors ligne

#2 Le 09/08/2007, à 23:53

hardball

Re : !!!PROB Mise en Place Proxy Squi!!!!

salut

essaye de tester pour voir ou ca bloque

1. ton proxy accède-t-il à internet (connexion et résolution de nom test avec un apt-get update par exemple )?
2. que disent les logs (/var/log/squid/)
3. ton dns est-il bien configuré (nslookup, /var/log/daemon.log)
4. ton proxy accède-t-il à internet en utilisant ton serveur dns ?
5. ta machine accède-t-elle à internet
6. ta machine accède-t-elle à internet en utilisant ton serveur dns
7. ta machine accède-t-elle à internet en utilisant ton serveur dns et ton proxy ?

sinon envoie les resultats des commandes

cat /etc/bind/named.conf
cat /etc/bind/named.conf.local
cat /etc/bind/named.conf.options
iptables -L
grep -v "^#" /etc/squid/squid.conf | grep -v "^$"

bon courage

Dernière modification par hardball (Le 09/08/2007, à 23:57)


-- Toshiba satelliteA100-335 + Ubuntu Jaunty --
Pour les noobs : Bienvenue ! ici la perséverance vous récompense.
Pour les anciens : Merci à vous de partager votre savoir.
Et vive le perl !

Hors ligne

#3 Le 10/08/2007, à 13:29

siks971

Re : !!!PROB Mise en Place Proxy Squi!!!!

déja un grand merci hardball

1.la freebox est branché sur eth0. j'accède à internet et je jepux faire apt-get update

2. lol apparament je ne sais pas lire les fichiers de log de /etc/var/log/squid

3. nslookup ne vois pas mon dns et ne fait pas de resolution de la machine Hibo.YvelinesRadio.local qui est mn serveur dns. il voit que les dns de free :

root@Hibo:/var/log# nslookup
> Hibo.YvelinesRadio.local
Server:         212.27.54.252
Address:        212.27.54.252#53

4. de ma machine cliente vu que le dns n'est pas configurer pour rediriger ceux de free ça ne peut pas fonctionner...

5. voici les fichiers de conf de bind9

////////named.conf///////
----------------------------------------------------------------------------------
root@Hibo:/var/log# cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};


zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

zone "10.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.10.168.192";
};

// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };

// From the release notes:
//  Because many of our users are uncomfortable receiving undelegated answers
//  from root or top level domains, other than a few for whom that behaviour
//  has been trusted and expected for quite some length of time, we have now
//  introduced the "root-delegations-only" feature which applies delegation-only
//  logic to all top level domains, and to the root domain.  An exception list
//  should be specified, including "MUSEUM" and "DE", and any other top level
//  domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };

include "/etc/bind/named.conf.local";
------------------------------------------------------------------------------
//////////named.conf.local
------------------------------------------------------------------------------
root@Hibo:/var/log# cat /etc/bind/named.conf.local
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "YvelinesRadio.local" {
        type master;
        file "/etc/bind/YvelinesRadio.local.hosts";
        };
include "/etc/bind/YvelinesRadio.local.hosts
--------------------------------------------------------------------------
//////////named.conf.local.option
------------------------------------------------------------------
root@Hibo:/var/log# cat /etc/bind/named.conf.options
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you might need to uncomment the query-source
        // directive below.  Previous versions of BIND always asked
        // questions using port 53, but BIND 8.1 and later use an unprivileged
        // port by default.

        // query-source address * port 53;

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders. 
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };

        // By default, name servers should only perform recursive domain
        // lookups for their direct clients.  If recursion is left open
        // to the entire Internet, your name server could be used to
        // perform distributed denial of service attacks against other
        // innocent computers.  For more information on DDoS recursion:
        // http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-0987

        allow-recursion { localnets; };

        // If you have DNS clients on other subnets outside of your
        // server's "localnets", you can explicitly add their networks
        // without opening up your server to the Internet at large:
        // allow-recursion { localnets; 192.168.0.0/24; };

        // If your name server is only listening on 127.0.0.1, consider:
        // allow-recursion { 127.0.0.1; };
};

--------------------------------------------------------------------------------------
iptables -L
root@Hibo:/var/log# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 
------------------------------------------------------------------------------------
le grep du fichier squid.conf

------------------------------------------------------------------------------
root@Hibo:/var/log# grep -v "^#" /etc/squid/squid.conf | grep -v "^$"
http_port 192.168.10.254:8080 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
access_log /var/log/squid/access.log squid
hosts_file /etc/hosts
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320
acl all src 0.0.0.0/0.0.0.0
acl lan src 192.168.10.0/255.255.255.0
acl allowed_clients src 192.168.10.2
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443          # https
acl SSL_ports port 563          # snews
acl SSL_ports port 873          # rsync
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl Safe_ports port 631         # cups
acl Safe_ports port 873         # rsync
acl Safe_ports port 901         # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow lan
http_access allow allowed_clients
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
cache_effective_group proxy
coredump_dir /var/spool/squid
cache_effective_user proxy
cache_effective_group proxy
cache_mem 16 MB
cache_dir ufs /var/spool/squid 1024 16 128
----------------------------------------------------------------------------------------
voila et un grand merci encore!!!a plut!


Fan de musique? Je suis egalement music producer -> http://siks-music.blogspot.com, n'hesitez pas a vister mon blog Ubuntu http://2tibuntu.blogspot.com

Hors ligne

#4 Le 10/08/2007, à 19:47

hardball

Re : !!!PROB Mise en Place Proxy Squi!!!!

hello
1-pour voir les logs squid essaye ca

sudo cat /var/log/squid/access.log

2-le  serveur dns fonctionne-t-il ?

le

include "/etc/bind/YvelinesRadio.local.hosts

à la fin du named.conf.local me semble etre une erreur

sur le serveur : fait un

/etc/init.d/bind9 restart

puis va voir les logs

tail -30 /var/log/daemon.log

y a-t-il des erreurs ?

3- ton serveur dns fait-il bien serveur cache (relais) ?
je ne pense pas.
mets plutot ca dans /etc/bind/named.conf.options

 
forwarders {
    212.27.54.252;
};

4-pour vérifier ton dns
sur une machine :

nslookup
>

pour interroger ton serveur, tape :

server 192.168.10.254

puis demande

www.google.fr

il devrait te répondre

si il te répond,
5-config client dns sur la machine cliente
as-tu dans /etc/resolv.conf

nameserver 192.168.10.254

si oui

configure ton navigateur pour utiliser un proxy

6-nb

http_access allow allowed_clients

dans squid.conf est superflu à cause de

http_access allow lan

-- Toshiba satelliteA100-335 + Ubuntu Jaunty --
Pour les noobs : Bienvenue ! ici la perséverance vous récompense.
Pour les anciens : Merci à vous de partager votre savoir.
Et vive le perl !

Hors ligne

#5 Le 13/08/2007, à 10:07

siks971

Re : !!!PROB Mise en Place Proxy Squi!!!!

bonjour et encore merci pour ton aide.

j'ai apporté quelques modification aux fichiers de configuration depuis vendredi, je vais donc essayer de récapituler un peu tout ça. je repond dabord à tes différentes questions :

1- root@Hibo:/var/log/squid# ls
access.log.1  access.log.2.gz  cache.log.1  cache.log.2.gz  store.log.1  store.log.2.gz
root@Hibo:/var/log/squid# cat acces.log.1
je n'ais pas de log de squid...

2- Mon fichier named.conf ressemble à ça maintenant :

-------------------------------------------------------------------------------------------------------------------------
include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
    type hint;
    file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
    type master;
    file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
    type master;
    file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
    type master;
    file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
    type master;
    file "/etc/bind/db.255";
};
include "/etc/bind/named.conf.local";
-----------------------------------------------------------------------------------------------------------
3- en faisant service bind9 restart, j'obtient l'erreur suivante dans les logs :

Aug 13 09:53:07 Hibo named[13563]: starting BIND 9.3.4 -u bind
Aug 13 09:53:07 Hibo named[13563]: found 1 CPU, using 1 worker thread
Aug 13 09:53:07 Hibo named[13563]: loading configuration from '/etc/bind/named.conf'
Aug 13 09:53:07 Hibo named[13563]: listening on IPv6 interfaces, port 53
Aug 13 09:53:07 Hibo named[13563]: binding TCP socket: address in use
Aug 13 09:53:07 Hibo named[13563]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 13 09:53:07 Hibo named[13563]: binding TCP socket: address in use
Aug 13 09:53:07 Hibo named[13563]: listening on IPv4 interface eth0, 192.168.0.200#53
Aug 13 09:53:07 Hibo named[13563]: binding TCP socket: address in use
Aug 13 09:53:07 Hibo named[13563]: listening on IPv4 interface eth1, 192.168.10.200#53
Aug 13 09:53:07 Hibo named[13563]: binding TCP socket: address in use
Aug 13 09:53:07 Hibo named[13563]: could not configure root hints from '/etc/bind/db.root': file not found
Aug 13 09:53:07 Hibo named[13563]: loading configuration: file not found
Aug 13 09:53:07 Hibo named[13563]: exiting (due to fatal error)

-----> il semblerait qu'il ne trouve pas le fichier db.root

4- j'ai rajouter dans named.conf.options les lignes

forwarders {
          212.27.54.252;
     };
moi dans une ancienne modificaion j'avais rajouté forwarders { 192.168.0.254; };

5- voila pour ce qui est du DNS qui ne fonctionne pas...je ne sais pas comment récupérer le fichier db.root
je vais faire les modifications des fichiers de config de squid..merci...j'attend avec impatience tes conseils....bonne journée


Fan de musique? Je suis egalement music producer -> http://siks-music.blogspot.com, n'hesitez pas a vister mon blog Ubuntu http://2tibuntu.blogspot.com

Hors ligne

#6 Le 13/08/2007, à 10:15

siks971

Re : !!!PROB Mise en Place Proxy Squi!!!!

!!!NOUVELLES MODIFICATION DANS BIND!!!!

voici les different fichiers de configurations
----------------------------------------------------------------------------------------------------------------
root@Hibo:/etc/bind# ls
10.168.192.in-addr.arpa.zone  named.conf.local   named.conf.options   rndc.key                   YvelinesRadio.local.hosts~
named.conf                    named.conf.local~  named.conf.options~  YvelinesRadio.local.hosts
root@Hibo:/etc/bind#
-------------------------------------------------------------------------------------------------------------------
root@Hibo:/etc/bind# cat named.conf.local
//
// Do any local configuration here
//
zone "YvelinesRadio.local" {
    type master;
    file "YvelinesRadio.local.hosts";
    allow-update { none; };
};
zone "10.168.192.in-addr.arpa" {
    type master;
    file "10.168.192.in-addr.arpa.zone";
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
--------------------------------------------------------------------------------------------------------------------------
root@Hibo:/etc/bind# cat YvelinesRadio.local.hosts
@    IN     SOA     Hibo.YvelinesRadio.local. root.YvelinesRadio.local. (
            2007071401
            21600
            3600
            604800
            86400 )
@     IN     NS    YvelinesRadio.local.
www     IN      A       192.168.10.200
ftp     IN      A       192.168.10.210
Hibo    IN      A       192.168.10.200
client  IN      A       192.168.10.2
freebox IN      A       192.168.0.254

-------------------------------------------------------------------------------------------------------------------------------------------
root@Hibo:/etc/bind# cat 10.168.192.in-addr.arpa.zone
@     IN     SOA     server.mondomaine.local. webmaster.mondomaine.local. (
            2007051401 ; serial
            21600 ; refresh after 6 hours
            3600 ; retry after 1 hour
            604800 ; expires after 1 week
            86400 ) ; minimum TTL of 1 day
@     IN     NS     Hibo.YvelinesRadio.local
1     IN     PTR ftp.YvelinesRadio.local.
2     IN     PTR Hibo.YvelinesRadio.local.
5     IN     PTR www.YvelinesRadio.local.
6     IN     PTR freebox.YvelinesRadio.local.
10     IN PTR client.YvelinesRadio.local.

-------------------------------------------------------------------------------------------------------
voila pour la zone directe et la zone indirecte......
@+


Fan de musique? Je suis egalement music producer -> http://siks-music.blogspot.com, n'hesitez pas a vister mon blog Ubuntu http://2tibuntu.blogspot.com

Hors ligne

#7 Le 13/08/2007, à 12:59

hardball

Re : !!!PROB Mise en Place Proxy Squi!!!!

c'est pas normal de ne par avoir le fichier db.root

pour le reconstruire

dig ns . @A.ROOT-SERVERS.NET. > /etc/bind/db.root

mais il te manque peut-etre d'autres fichiers

chez moi :

ll /etc/bind
total 56K
-rw-rw-rw- 1 root bind  237 2007-02-02 03:31 db.0
-rw-rw-rw- 1 root bind  271 2007-02-02 03:31 db.127
-rw-rw-rw- 1 root bind  237 2007-02-02 03:31 db.255
-rw-rw-rw- 1 root bind  353 2007-02-02 03:31 db.empty
-rw-rw-rw- 1 root bind  256 2007-02-02 03:31 db.local
-rw-rw-rw- 1 root bind 1,5K 2007-02-02 03:31 db.root
-rw-rw-rw- 1 root bind 1,7K 2007-08-09 16:36 named.conf
-rw-rw-rw- 1 root bind  435 2007-08-09 16:45 named.conf.local
-rw-rw-rw- 1 root bind 1,5K 2007-02-02 03:31 named.conf.options
-rw-rw-rw- 1 bind bind   77 2007-05-21 15:31 rndc.key
-rw-rw-rw- 1 root root 1,3K 2007-02-02 03:31 zones.rfc1918

tes fichiers de zone ont l'air correct

http://fr.tldp.org/HOWTO/lecture/DNS-HOWTO.htmlune doc en francais !

bon courage


-- Toshiba satelliteA100-335 + Ubuntu Jaunty --
Pour les noobs : Bienvenue ! ici la perséverance vous récompense.
Pour les anciens : Merci à vous de partager votre savoir.
Et vive le perl !

Hors ligne

#8 Le 13/08/2007, à 14:19

siks971

Re : !!!PROB Mise en Place Proxy Squi!!!!

Merci beaucoups je vais essayer,mais la je reinstalle ubuntu...petit problème de démarrage de l'environnement graphique....message d'erreur j'ai du me choper un truc ce week end!!!je te dirais si ça a fonctionné!!!


Fan de musique? Je suis egalement music producer -> http://siks-music.blogspot.com, n'hesitez pas a vister mon blog Ubuntu http://2tibuntu.blogspot.com

Hors ligne

#9 Le 13/08/2007, à 15:22

siks971

Re : !!!PROB Mise en Place Proxy Squi!!!!

GENIALLLLLLLLLLLLLL
Mon serveur DNS FONCTIONNE!!!!!

-----------------------------------------------
Aug 13 15:20:25 Hibo named[19773]: starting BIND 9.3.4 -u bind
Aug 13 15:20:25 Hibo named[19773]: found 1 CPU, using 1 worker thread
Aug 13 15:20:25 Hibo named[19773]: loading configuration from '/etc/bind/named.conf'
Aug 13 15:20:25 Hibo named[19773]: listening on IPv6 interfaces, port 53
Aug 13 15:20:25 Hibo named[19773]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 13 15:20:25 Hibo named[19773]: listening on IPv4 interface eth0, 192.168.0.200#53
Aug 13 15:20:25 Hibo named[19773]: listening on IPv4 interface eth1:avahi, 169.254.6.186#53
Aug 13 15:20:25 Hibo named[19773]: command channel listening on 127.0.0.1#953
Aug 13 15:20:25 Hibo named[19773]: command channel listening on ::1#953
Aug 13 15:20:25 Hibo named[19773]: zone 0.in-addr.arpa/IN: loaded serial 1
Aug 13 15:20:25 Hibo named[19773]: zone 127.in-addr.arpa/IN: loaded serial 1
Aug 13 15:20:25 Hibo named[19773]: zone 10.168.192.in-addr.arpa/IN: loading master file 10.168.192.in-addr.arpa.zone: file not found
Aug 13 15:20:25 Hibo named[19773]: zone 255.in-addr.arpa/IN: loaded serial 1
Aug 13 15:20:25 Hibo named[19773]: zone YvelinesRadio.local/IN: loading master file YvelinesRadio.local.hosts: file not found
Aug 13 15:20:25 Hibo named[19773]: zone localhost/IN: loaded serial 1
Aug 13 15:20:25 Hibo named[19773]: running
------------------------------------------------------------------------------------------
LLOOOOlll merciiiiiiiiiiiiiii

Bon reste encore a voir si squid fonctionne

@+


Fan de musique? Je suis egalement music producer -> http://siks-music.blogspot.com, n'hesitez pas a vister mon blog Ubuntu http://2tibuntu.blogspot.com

Hors ligne

#10 Le 13/08/2007, à 16:01

siks971

Re : !!!PROB Mise en Place Proxy Squi!!!!

j'avoue que j'ai du copier mes fichiers de zones dans /var/cache/bind

tcho!


Fan de musique? Je suis egalement music producer -> http://siks-music.blogspot.com, n'hesitez pas a vister mon blog Ubuntu http://2tibuntu.blogspot.com

Hors ligne