Jump to content
Not connected, Your IP: 18.117.158.47
Sign in to follow this  
Guest

Connecting to air server via command line ubuntu

Recommended Posts

Guest
Posted ... (edited)

Using ubuntu 15.04 x64 VPS

 

I'm trying to connect to air (Baten) via command line

 

I installed openvpn and added the .ovpn file from the linux config generator here.

 

This is what im getting:

 

 

Thu Oct 29 01:23:00 2015 OpenVPN 2.3.2 x86_64-pc-linux-gnu [sSL (OpenSSL)] [LZO]                                                                                         [EPOLL] [PKCS11] [eurephia] [MH] [iPv6] built on Apr 13 2015
Thu Oct 29 01:23:00 2015 Control Channel Authentication: tls-auth using INLINE s                                                                                        tatic key file
Thu Oct 29 01:23:00 2015 Outgoing Control Channel Authentication: Using 160 bit                                                                                         message hash 'SHA1' for HMAC authentication
Thu Oct 29 01:23:00 2015 Incoming Control Channel Authentication: Using 160 bit                                                                                         message hash 'SHA1' for HMAC authentication
Thu Oct 29 01:23:00 2015 Socket Buffers: R=[133120->131072] S=[133120->131072]
Thu Oct 29 01:23:00 2015 UDPv4 link local: [undef]
Thu Oct 29 01:23:00 2015 UDPv4 link remote: [AF_INET]46.166.165.124:443
Thu Oct 29 01:23:00 2015 TLS: Initial packet from [AF_INET]46.166.165.124:443, s                                                                                        id=08e94ed1 ce992fdd
Thu Oct 29 01:23:00 2015 VERIFY OK: depth=1, C=IT, ST=IT, L=Perugia, O=airvpn.or                                                                                        g, CN=airvpn.org CA, emailAddress=info@airvpn.org
Thu Oct 29 01:23:00 2015 Validating certificate key usage
Thu Oct 29 01:23:00 2015 ++ Certificate has key usage  00a0, expects 00a0
Thu Oct 29 01:23:00 2015 VERIFY KU OK
Thu Oct 29 01:23:00 2015 Validating certificate extended key usage
Thu Oct 29 01:23:00 2015 ++ Certificate has EKU (str) TLS Web Server Authenticat                                                                                        ion, expects TLS Web Server Authentication
Thu Oct 29 01:23:00 2015 VERIFY EKU OK
Thu Oct 29 01:23:00 2015 VERIFY OK: depth=0, C=IT, ST=IT, L=Perugia, O=airvpn.or                                                                                        g, CN=server, emailAddress=info@airvpn.org
Thu Oct 29 01:23:00 2015 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized                                                                                         with 256 bit key
Thu Oct 29 01:23:00 2015 Data Channel Encrypt: Using 160 bit message hash 'SHA1'                                                                                         for HMAC authentication
Thu Oct 29 01:23:00 2015 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized                                                                                         with 256 bit key
Thu Oct 29 01:23:00 2015 Data Channel Decrypt: Using 160 bit message hash 'SHA1'                                                                                         for HMAC authentication
Thu Oct 29 01:23:00 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES2                                                                                        56-SHA, 4096 bit RSA
Thu Oct 29 01:23:00 2015 [server] Peer Connection Initiated with [AF_INET]46.166                                                                                        .165.124:443
Thu Oct 29 01:23:02 2015 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Thu Oct 29 01:23:02 2015 PUSH: Received control message: 'PUSH_REPLY,redirect-ga                                                                                        teway def1 bypass-dhcp,dhcp-option DNS 10.4.0.1,comp-lzo no,route-gateway 10.4.0                                                                                        .1,topology subnet,ping 10,ping-restart 60,ifconfig 10.4.4.66 255.255.0.0'
Thu Oct 29 01:23:02 2015 OPTIONS IMPORT: timers and/or timeouts modified
Thu Oct 29 01:23:02 2015 OPTIONS IMPORT: LZO parms modified
Thu Oct 29 01:23:02 2015 OPTIONS IMPORT: --ifconfig/up options modified
Thu Oct 29 01:23:02 2015 OPTIONS IMPORT: route options modified
Thu Oct 29 01:23:02 2015 OPTIONS IMPORT: route-related options modified
Thu Oct 29 01:23:02 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options                                                                                         modified
Thu Oct 29 01:23:02 2015 ROUTE_GATEWAY ON_LINK IFACE=venet0 HWADDR=00:00:00:00:0                                                                                        0:00
Thu Oct 29 01:23:02 2015 TUN/TAP device tun0 opened
Thu Oct 29 01:23:02 2015 TUN/TAP TX queue length set to 100
Thu Oct 29 01:23:02 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu Oct 29 01:23:02 2015 /sbin/ip link set dev tun0 up mtu 1500
Thu Oct 29 01:23:02 2015 /sbin/ip addr add dev tun0 10.4.4.66/16 broadcast 10.4.                                                                                        255.255
_______
or i get
_______
 
Thu Oct 29 03:31:28 2015 OpenVPN 2.3.2 x86_64-pc-linux-gnu [sSL (OpenSSL)] [LZO]                                                     [EPOLL] [PKCS11] [eurephia] [MH] [iPv6] built on Apr 13 2015
Thu Oct 29 03:31:28 2015 Control Channel Authentication: tls-auth using INLINE s                                                    tatic key file
Thu Oct 29 03:31:28 2015 Outgoing Control Channel Authentication: Using 160 bit                                                     message hash 'SHA1' for HMAC authentication
Thu Oct 29 03:31:28 2015 Incoming Control Channel Authentication: Using 160 bit                                                     message hash 'SHA1' for HMAC authentication
Thu Oct 29 03:31:28 2015 Socket Buffers: R=[133120->131072] S=[133120->131072]
Thu Oct 29 03:31:28 2015 UDPv4 link local: [undef]
Thu Oct 29 03:31:28 2015 UDPv4 link remote: [AF_INET]46.166.165.124:443
Thu Oct 29 03:31:28 2015 TLS: Initial packet from [AF_INET]46.166.165.124:443, s                                                    id=dabbda9c cf5b4987
Thu Oct 29 03:31:28 2015 VERIFY OK: depth=1, C=IT, ST=IT, L=Perugia, O=airvpn.or                                                    g, CN=airvpn.org CA, emailAddress=info@airvpn.org
Thu Oct 29 03:31:28 2015 Validating certificate key usage
Thu Oct 29 03:31:28 2015 ++ Certificate has key usage  00a0, expects 00a0
Thu Oct 29 03:31:28 2015 VERIFY KU OK
Thu Oct 29 03:31:28 2015 Validating certificate extended key usage
Thu Oct 29 03:31:28 2015 ++ Certificate has EKU (str) TLS Web Server Authenticat                                                    ion, expects TLS Web Server Authentication
Thu Oct 29 03:31:28 2015 VERIFY EKU OK
Thu Oct 29 03:31:28 2015 VERIFY OK: depth=0, C=IT, ST=IT, L=Perugia, O=airvpn.or                                                    g, CN=server, emailAddress=info@airvpn.org
Thu Oct 29 03:31:28 2015 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized                                                     with 256 bit key
Thu Oct 29 03:31:28 2015 Data Channel Encrypt: Using 160 bit message hash 'SHA1'                                                     for HMAC authentication
Thu Oct 29 03:31:28 2015 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized                                                     with 256 bit key
Thu Oct 29 03:31:28 2015 Data Channel Decrypt: Using 160 bit message hash 'SHA1'                                                     for HMAC authentication
Thu Oct 29 03:31:28 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES2                                                    56-SHA, 4096 bit RSA
Thu Oct 29 03:31:28 2015 [server] Peer Connection Initiated with [AF_INET]46.166                                                    .165.124:443
Thu Oct 29 03:31:30 2015 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Thu Oct 29 03:31:30 2015 PUSH: Received control message: 'PUSH_REPLY,redirect-ga                                                    teway def1 bypass-dhcp,dhcp-option DNS 10.4.0.1,comp-lzo no,route-gateway 10.4.0                                                    .1,topology subnet,ping 10,ping-restart 60,ifconfig 10.4.4.66 255.255.0.0'
Thu Oct 29 03:31:30 2015 OPTIONS IMPORT: timers and/or timeouts modified
Thu Oct 29 03:31:30 2015 OPTIONS IMPORT: LZO parms modified
Thu Oct 29 03:31:30 2015 OPTIONS IMPORT: --ifconfig/up options modified
Thu Oct 29 03:31:30 2015 OPTIONS IMPORT: route options modified
Thu Oct 29 03:31:30 2015 OPTIONS IMPORT: route-related options modified
Thu Oct 29 03:31:30 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options                                                     modified
Thu Oct 29 03:31:30 2015 ROUTE_GATEWAY ON_LINK IFACE=venet0 HWADDR=00:00:00:00:0                                                    0:00
Thu Oct 29 03:31:30 2015 TUN/TAP device tun0 opened
Thu Oct 29 03:31:30 2015 TUN/TAP TX queue length set to 100
Thu Oct 29 03:31:30 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu Oct 29 03:31:30 2015 /sbin/ip link set dev tun0 up mtu 1500
Thu Oct 29 03:31:30 2015 /sbin/ip addr add dev tun0 10.4.4.66/16 broadcast 10.4.                                                    255.255
Thu Oct 29 03:31:35 2015 /sbin/ip route add 46.166.165.124/32 via 0.0.0.0
RTNETLINK answers: No such device
Thu Oct 29 03:31:35 2015 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Oct 29 03:31:35 2015 /sbin/ip route add 0.0.0.0/1 via 10.4.0.1
 
 
 
And then putty stops working. I check my airvpn.org client status page and I see the connection. After 2 minutes it disconnects 
 
I can still access it via a "webconsole" but cant make it work.
 
 
any help apreciated!
 
 
This is strange right? "/sbin/ip route add 0.0.0.0/1 via 10.4.0.1"
Edited ... by ZPKZ

Share this post


Link to post

use a proper routing. (here is the example for .sh file)

 

#!/bin/bash
MY_IP=$(ip addr show ppp0 | grep 'inet ' | awk '{ print $2 }')
sudo route add default gw $MY_IP

sudo ip tuntap add mode tun tun0
sudo ip link set dev tun0

RTNETLINK answers: No such device is due to lack of the last two strings,

 

/sbin/ip route add 0.0.0.0 will be fixed by the adding proper routing

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...