Skrevet av Emne: CentOS 7 nmap-ncat does not support SOCKS5  (Lest 6077 ganger)

Utlogget Floyd-ATC

  • Livstidsdiktator
  • Administrator
  • Guru
  • *****
  • Innlegg: 542
  • Karma: +12/-0
    • MSN Messenger - floyd@atc.no
    • Vis profil
    • floyd.atc.no
    • E-post
CentOS 7 nmap-ncat does not support SOCKS5
« på: 16. Oktober 2016, 19:59 pm »
  • [applaud]0
  • [smite]0
  • Tunneling an ssh session through a SOCKS5 proxy (e.g. using Tor) should be possible by adding the following to your
    Kode: [Velg]
    /etc/ssh/ssh_config file:

    Kode: [Velg]
    Host *.example.com
            CheckHostIP no
            Compression yes
            Protocol 2
            ProxyCommand ncat --nodns --proxy-type socks5 --proxy 127.0.0.1:9050 %h %p

    Unfortunately, RHEL7/CentOS 7 ships with a rather antiquated version of nmap-ncat (a modern replacement for the now unmaintained BSD netcat) and this version only supports socks4.

    Trying to use socks4 is similar to using no proxy at all, it fails with the following rather cryptic error message:
    Kode: [Velg]
    get_sock_port: getnameinfo NI_NUMERICSERV failed: ai_family not supported
    Solution:
    Uninstall the useless version of nmap-ncat:
    Kode: [Velg]
    yum erase nmap-ncatDownload the newest RPM from https://nmap.org/download.html
    Install it. Example:
    Kode: [Velg]
    yum localinstall ncat-7.30-1.x86_64.rpmFix your
    Kode: [Velg]
    /etc/ssh/ssh_config as shown above.


    -Floyd.

    --
    Det finnes 10 typer mennesker;
    de som forstår binærtall, de som ikke gjør det, og de som forstår Grey code.