IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Administration système Discussion :

yum/wget et proxy


Sujet :

Administration système

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Février 2006
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 4
    Par défaut [résolu] yum/wget et proxy
    Bonjour,
    je suis sous CentOS 4.6 derrière un proxy (sans password) et je ne parviens pas à accéder à l'extérieur.
    voici mes fichiers de conf :

    /etc/profile
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
     
    # /etc/profile
     
    # System wide environment and startup programs, for login setup
    # Functions and aliases go in /etc/bashrc
     
    pathmunge () {
     if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
        if [ "$2" = "after" ] ; then
           PATH=$PATH:$1
        else
           PATH=$1:$PATH
        fi
     fi
    }
     
    # Path manipulation
    if [ `id -u` = 0 ]; then
     pathmunge /sbin
     pathmunge /usr/sbin
     pathmunge /usr/local/sbin
    fi
     
    pathmunge /usr/X11R6/bin after
     
     
    # No core files by default
    ulimit -S -c 0 > /dev/null 2>&1
     
    USER="`id -un`"
    LOGNAME=$USER
    MAIL="/var/spool/mail/$USER"
     
    HOSTNAME=`/bin/hostname`
    HISTSIZE=1000
     
    if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
        INPUTRC=/etc/inputrc
    fi
     
    export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
     
    for i in /etc/profile.d/*.sh ; do
        if [ -r "$i" ]; then
         . $i
        fi
    done
     
    export http_proxy=http://194.167.111.7:8080/
     
    unset i
    unset pathmunge
    /etc/yum.conf
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    [main]
    cachedir=/var/cache/yum
    debuglevel=2
    logfile=/var/log/yum.log
    pkgpolicy=newest
    installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel
    distroverpkg=centos-release
    tolerant=1
    exactarch=1
    retries=20
    obsoletes=1
    gpgcheck=1
    plugins=1
     
    #proxy
     
    proxy = http://194.167.111.7:8080/
     
    # PUT YOUR REPOS HERE OR IN separate files named file.repo
    # in /etc/yum.repos.d
    /etc/wgetrc
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    ###
    ### Sample Wget initialization file .wgetrc
    ###
     
    ## You can use this file to change the default behaviour of wget or to
    ## avoid having to type many many command-line options. This file does
    ## not contain a comprehensive list of commands -- look at the manual
    ## to find out what you can put into this file.
    ##
    ## Wget initialization file can reside in /etc/wgetrc
    ## (global, for all users) or $HOME/.wgetrc (for a single user).
    ##
    ## To use the settings in this file, you will have to uncomment them,
    ## as well as change them, in most cases, as the values on the
    ## commented-out lines are the default values (e.g. "off").
     
     
    ##
    ## Global settings (useful for setting up in /etc/wgetrc).
    ## Think well before you change them, since they may reduce wget's
    ## functionality, and make it behave contrary to the documentation:
    ##
     
    # You can set retrieve quota for beginners by specifying a value
    # optionally followed by 'K' (kilobytes) or 'M' (megabytes).  The
    # default quota is unlimited.
    #quota = inf
     
    # You can lower (or raise) the default number of retries when
    # downloading a file (default is 20).
    #tries = 20
     
    # Lowering the maximum depth of the recursive retrieval is handy to
    # prevent newbies from going too "deep" when they unwittingly start
    # the recursive retrieval.  The default is 5.
    #reclevel = 5
     
    # By default Wget uses "passive FTP" transfer where the client
    # initiates the data connection to the server rather than the other
    # way around.  That is required on systems behind NAT where the client
    # computer cannot be easily reached from the Internet.  However, some
    # firewalls software explicitly supports active FTP and in fact has
    # problems supporting passive transfer.  If you are in such
    # environment, use "passive_ftp = off" to revert to active FTP.
    #passive_ftp = off
     
    # The "wait" command below makes Wget wait between every connection.
    # If, instead, you want Wget to wait only between retries of failed
    # downloads, set waitretry to maximum number of seconds to wait (Wget
    # will use "linear backoff", waiting 1 second after the first failure
    # on a file, 2 seconds after the second failure, etc. up to this max).
    waitretry = 10
     
     
    ##
    ## Local settings (for a user to set in his $HOME/.wgetrc).  It is
    ## *highly* undesirable to put these settings in the global file, since
    ## they are potentially dangerous to "normal" users.
    ##
    ## Even when setting up your own ~/.wgetrc, you should know what you
    ## are doing before doing so.
    ##
     
    # Set this to on to use timestamping by default:
    #timestamping = off
     
    # It is a good idea to make Wget send your email address in a `From:'
    # header with your request (so that server administrators can contact
    # you in case of errors).  Wget does *not* send `From:' by default.
    #header = From: Your Name <username@site.domain>
     
    # You can set up other headers, like Accept-Language.  Accept-Language
    # is *not* sent by default.
    #header = Accept-Language: en
     
    # You can set the default proxies for Wget to use for http and ftp.
    # They will override the value in the environment.
    #http_proxy = http://proxy.yoyodyne.com:18023/
    #ftp_proxy = http://proxy.yoyodyne.com:18023/
    http_proxy = http://194.167.111.7:8080/
     
    # If you do not want to use proxy at all, set this to off.
    #use_proxy = on
    use_proxy = on
     
    # You can customize the retrieval outlook.  Valid options are default,
    # binary, mega and micro.
    #dot_style = default
     
    # Setting this to off makes Wget not download /robots.txt.  Be sure to
    # know *exactly* what /robots.txt is and how it is used before changing
    # the default!
    #robots = on
     
    # It can be useful to make Wget wait between connections.  Set this to
    # the number of seconds you want Wget to wait.
    #wait = 0
     
    # You can force creating directory structure, even if a single is being
    # retrieved, by setting this to on.
    #dirstruct = off
     
    # You can turn on recursive retrieving by default (don't do this if
    # you are not sure you know what it means) by setting this to on.
    #recursive = off
     
    # To always back up file X as X.orig before converting its links (due
    # to -k / --convert-links / convert_links = on having been specified),
    # set this variable to on:
    #backup_converted = off
     
    # To have Wget follow FTP links from HTML files by default, set this
    # to on:
    #follow_ftp = off
    J'obtiens les résultats suivants :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    [root@XXX ~]# yum update
    Setting up Update Process
    Setting up repositories
    http://mirror.centos.org/centos/4/updates/i386/repodata/repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
    Trying other mirror.
    Cannot open/read repomd.xml file for repository: update
    failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.
    Error: failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    [root@XXX ~]# wget http://www.centre-linux.org/IMG/arton312.png
    --14:47:35--  http://www.centre-linux.org/IMG/arton312.png
               => `arton312.png'
    Connecting to 194.167.111.7:8080... failed: Connection timed out.
    Retrying.
     
    --14:50:45--  http://www.centre-linux.org/IMG/arton312.png
      (try: 2) => `arton312.png'
    Connecting to 194.167.111.7:8080...
    sans arriver à aller plus loin.

    Pouvez vous me dire ce qui ne va pas ?
    Merci d'avance

  2. #2
    Invité
    Invité(e)
    Par défaut
    telnet 194.167.111.7 8080 fonctionne-t-il?

    ton navigateur est configuré avec ce proxy? la connexion fonctionne-t-elle via ton navigateur?

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Février 2006
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 4
    Par défaut
    Merci pour ton aide mygale.
    En ce qui concerne le navigateur, mon serveur n'a pas d'interface graphique (afin d'optimiser la tâche qui est la sienne : sonde snort)
    Pour telnet :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    [root@XXX ~]# telnet 194.167.111.7:8080
    194.167.111.7:8080/telnet: Name or service not known

  4. #4
    Invité
    Invité(e)
    Par défaut
    Citation Envoyé par Fozinda Voir le message
    Merci pour ton aide mygale.
    En ce qui concerne le navigateur, mon serveur n'a pas d'interface graphique (afin d'optimiser la tâche qui est la sienne : sonde snort)
    Pour telnet :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    [root@XXX ~]# telnet 194.167.111.7:8080
    194.167.111.7:8080/telnet: Name or service not known

    Fozinda,

    c'est telnet <ip> <espace> <port>
    et non
    telenet <ip><:><port>

    quelle est ta configuration réseaux par la même occasion?

  5. #5
    Futur Membre du Club
    Profil pro
    Inscrit en
    Février 2006
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 4
    Par défaut
    oops ...

    mon serveur possède 2 NICs, une d'admin qui se trouve sur le même vlan que mon poste client d'où j'utilise une interface graphique web pour consulter les alertes snort, et une autre branchée directement sur le routeur central et qui sniff tous les vlans.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    [root@XXX ~]# telnet 194.167.111.7 8080
    Trying 194.167.111.7...
    telnet: connect to address 194.167.111.7: Connection timed out
    telnet: Unable to connect to remote host: Connection timed out

  6. #6
    Invité
    Invité(e)
    Par défaut
    ton serveur proxy ne parvient pas à être contacté.

    quel est le range d'ip utilisé sur tes deux vlan?

    sur quel vlan se trouve ton serveur proxy?

    info sur ton proxy?
    si ton serveur proxy est squid est-ce que le service est bien démarré?

    Pour info tu peux aussi utiliser des navigateurs en mode texte comme links ou lynx

Discussions similaires

  1. yum ou smart via un proxy
    Par ybalauze dans le forum Administration système
    Réponses: 1
    Dernier message: 28/11/2007, 10h06
  2. Proxy, tunneling, détournement de firewall
    Par Davide dans le forum Développement
    Réponses: 19
    Dernier message: 08/10/2003, 13h16
  3. [HTTP] Wget-like
    Par tmonjalo dans le forum Développement
    Réponses: 2
    Dernier message: 28/07/2003, 13h39
  4. [Serveur Proxy] Windows XP PRO suffit-il à lui seul ?
    Par Yoh dans le forum Développement
    Réponses: 3
    Dernier message: 21/05/2003, 11h23
  5. Les serveur proxy socks
    Par berry dans le forum Réseau
    Réponses: 6
    Dernier message: 26/01/2003, 17h56

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo