vpn в BackTrack 4?

Discussion in 'Linux, Freebsd, *nix' started by 547, 9 Dec 2009.

  1. 547

    547 Active Member

    Joined:
    11 Oct 2009
    Messages:
    216
    Likes Received:
    105
    Reputations:
    50
    Как настроить vpn в BackTrack 4?
     
    #1 547, 9 Dec 2009
    Last edited by a moderator: 10 Dec 2009
  2. Ponchik

    Ponchik Хлебо-булочное изделие

    Joined:
    30 Aug 2005
    Messages:
    687
    Likes Received:
    807
    Reputations:
    311
    http://www.google.com/search?client=opera&rls=ru&q=настроить+VPN+linux&sourceid=opera&ie=utf-8&oe=utf-8
     
    1 person likes this.
  3. 547

    547 Active Member

    Joined:
    11 Oct 2009
    Messages:
    216
    Likes Received:
    105
    Reputations:
    50
    спс, было решено пустить в ход такой скрипт!
    Code:
    
    #!/bin/sh
     
    #
    # fix broken path
    #
    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:.
    export PATH
     
    #
    # network settings
    #
    USER=ВАШ_ЛОГИН_НА_VPN
    NETWORK=192.168.0.0 // настроить на для своей сети
    NETMASK=255.255.255.0 // обычно вроде такая и останется
    VPNSERVER=192.168.0.253 // Смените на ваш адрес vpn-сервера
    GATEWAY=192.168.55.253 // Указать свой
    DEVICE=eth0 // если нужно, то тоже сменить
     
    #
    # vpn stuff
    #
    PPPD=/usr/sbin/pppd
    PPTP=/usr/sbin/pptp
     
    if [ ! -x $PPPD ]; then
     echo «$0: $PPPD not found»
     exit 1
    fi
     
    if [ ! -x $PPTP ]; then
     echo «$0: $PPTP not found»
     exit 1
    fi
     
    #
    # here we go
    #
    case «$1» in
     start)
     if [ ! -d /var/run/pptp ]; then
     mkdir /var/run/pptp
     fi
     if [ -f /var/run/pptp/remote ]; then
     if ping -vc1 'cat /var/run/pptp/remote'; then
     exit 1
     fi
     killall -HUP pptp
     killall -TERM pppd
     sleep 2
     fi
     rm -rf /var/run/pptp/* >/dev/null
     route del default
     route add -net $NETWORK netmask $NETMASK gw $GATEWAY dev $DEVICE
     echo -n «===> Starting vpn: »
     ($PPTP $VPNSERVER defaultroute noauth user $USER && \
     echo -n «done») || echo -n «failed»
     echo
     ;;
     stop)
     echo -n «===> Stopping vpn: »
     killall -HUP pptp
     killall -TERM pppd
     sleep 2
     rm /var/run/pptp/* >/dev/null
     route del -net $NETWORK netmask $NETMASK gw $GATEWAY dev $DEVICE
     route add default gw $GATEWAY dev $DEVICE
     echo «done»
     ;;
     restart)
     $0 stop
     sleep 2
     $0 start
     ;;
     *)
     echo «*** Usage: vpn {start|stop|restart}»
     exit 1
     ;;
    esac
     
    exit 0
     
  4. zythar

    zythar Elder - Старейшина

    Joined:
    16 Feb 2008
    Messages:
    517
    Likes Received:
    109
    Reputations:
    5
    https://forum.antichat.ru/showthread.php?p=1441969?