[SOLVED] [ArchLinux] invalid argument code 22

All comments and questions related to the functionality of the OpenVPN web pages and forum should go here.
Locked
Ichika
OpenVpn Newbie
Posts: 4
Joined: Fri Mar 02, 2012 9:44 pm

[SOLVED] [ArchLinux] invalid argument code 22

Post by Ichika » Fri Mar 02, 2012 10:03 pm

Good evening,

I'm using a VPN from vpntunnel.se and I followed this tutorial to make it work : https://wiki.archlinux.org/index.php/OpenVPN.

Unfortunately, it doesn't work.

Here is my configuration :

/etc/openvpn/openvpn-Swe.conf
float
client
dev tun
proto udp
nobind

; CERT
ca /etc/openvpn/keys/ca.crt
ns-cert-type server
cipher BF-CBC

; HOST
remote-random
remote anna.vpntunnel.se 10010
remote anna.vpntunnel.se 10020
remote anna.vpntunnel.se 1194

resolv-retry infinite

; AUTH
auth-user-pass /etc/openvpn/pw/pw
persist-key
persist-tun

comp-lzo
verb 5

log-append /var/log/openvpn
script-security 2
up /usr/share/openvpn/update-resolv-conf
down /usr/share/openvpn/update-resolv-conf
/usr/share/openvpn/update-resolv-conf
#!/bin/bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk>
# and Chris Hanson
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
#
# 05/2006 chlauber@bnc.ch
#
# Example envs set from openvpn:
# foreign_option_1='dhcp-option DNS 193.43.27.132'
# foreign_option_2='dhcp-option DNS 193.43.27.133'
# foreign_option_3='dhcp-option DOMAIN be.bnc.ch'

[ -x /usr/sbin/resolvconf ] || exit 0

case $script_type in

up)
for optionname in ${!foreign_option_*} ; do
option="${!optionname}"
echo $option
part1=$(echo "$option" | cut -d " " -f 1)
if [ "$part1" == "dhcp-option" ] ; then
part2=$(echo "$option" | cut -d " " -f 2)
part3=$(echo "$option" | cut -d " " -f 3)
if [ "$part2" == "DNS" ] ; then
IF_DNS_NAMESERVERS="$IF_DNS_NAMESERVERS $part3"
fi
if [ "$part2" == "DOMAIN" ] ; then
IF_DNS_SEARCH="$part3"
fi
fi
done
R=""
if [ "$IF_DNS_SEARCH" ] ; then
R="${R}search $IF_DNS_SEARCH
"
fi
for NS in $IF_DNS_NAMESERVERS ; do
R="${R}nameserver $NS
"
done
echo -n "$R" | /usr/sbin/resolvconf -a "${dev}.inet"
;;
down)
/usr/sbin/resolvconf -d "${dev}.inet"
;;
esac
result of ifconfig :
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
inet 192.168.2.104 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::226:18ff:fea7:58c2 prefixlen 64 scopeid 0x20<link>
ether 00:26:18:a7:58:c2 txqueuelen 1000 (Ethernet)
RX packets 67873 bytes 72233810 (68.8 MiB)
RX errors 0 dropped 8 overruns 0 frame 0
TX packets 43167 bytes 7825107 (7.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 47 base 0x6000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436 metric 1
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 44 bytes 2600 (2.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 44 bytes 2600 (2.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 metric 1
inet 178.73.219.110 netmask 255.255.255.255 destination 255.255.255.0
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
/etc/rc.conf
# DAEMONS
DAEMONS=(hwclock syslog-ng dbus network dhcp4 openvpn crond kdm)
Finally, here is the log :

/var/log/openvpn
Fri Mar 2 22:47:01 2012 us=580000 Current Parameter Settings:
Fri Mar 2 22:47:01 2012 us=580045 config = '/etc/openvpn/openvpn-Swe.conf'
Fri Mar 2 22:47:01 2012 us=580053 mode = 0
Fri Mar 2 22:47:01 2012 us=580059 persist_config = DISABLED
Fri Mar 2 22:47:01 2012 us=580064 persist_mode = 1
Fri Mar 2 22:47:01 2012 us=580070 show_ciphers = DISABLED
Fri Mar 2 22:47:01 2012 us=580076 show_digests = DISABLED
Fri Mar 2 22:47:01 2012 us=580081 show_engines = DISABLED
Fri Mar 2 22:47:01 2012 us=580087 genkey = DISABLED
Fri Mar 2 22:47:01 2012 us=580093 key_pass_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580098 show_tls_ciphers = DISABLED
Fri Mar 2 22:47:01 2012 us=580106 Connection profiles [default]:
Fri Mar 2 22:47:01 2012 us=580112 proto = udp
Fri Mar 2 22:47:01 2012 us=580117 local = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580123 local_port = 1194
Fri Mar 2 22:47:01 2012 us=580128 remote = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580134 remote_port = 1194
Fri Mar 2 22:47:01 2012 us=580139 remote_float = ENABLED
Fri Mar 2 22:47:01 2012 us=580145 bind_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=580150 bind_local = DISABLED
Fri Mar 2 22:47:01 2012 us=580156 connect_retry_seconds = 5
Fri Mar 2 22:47:01 2012 us=580161 connect_timeout = 10
Fri Mar 2 22:47:01 2012 us=580167 connect_retry_max = 0
Fri Mar 2 22:47:01 2012 us=580172 socks_proxy_server = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580178 socks_proxy_port = 0
Fri Mar 2 22:47:01 2012 us=580183 socks_proxy_retry = DISABLED
Fri Mar 2 22:47:01 2012 us=580189 Connection profiles [0]:
Fri Mar 2 22:47:01 2012 us=580195 proto = udp
Fri Mar 2 22:47:01 2012 us=580200 local = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580206 local_port = 0
Fri Mar 2 22:47:01 2012 us=580211 remote = 'anna.vpntunnel.se'
Fri Mar 2 22:47:01 2012 us=580217 remote_port = 10010
Fri Mar 2 22:47:01 2012 us=580223 remote_float = ENABLED
Fri Mar 2 22:47:01 2012 us=580228 bind_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=580234 bind_local = DISABLED
Fri Mar 2 22:47:01 2012 us=580239 connect_retry_seconds = 5
Fri Mar 2 22:47:01 2012 us=580245 connect_timeout = 10
Fri Mar 2 22:47:01 2012 us=580250 connect_retry_max = 0
Fri Mar 2 22:47:01 2012 us=580256 socks_proxy_server = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580261 socks_proxy_port = 0
Fri Mar 2 22:47:01 2012 us=580267 socks_proxy_retry = DISABLED
Fri Mar 2 22:47:01 2012 us=580272 Connection profiles [1]:
Fri Mar 2 22:47:01 2012 us=580278 proto = udp
Fri Mar 2 22:47:01 2012 us=580284 local = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580289 local_port = 0
Fri Mar 2 22:47:01 2012 us=580295 remote = 'anna.vpntunnel.se'
Fri Mar 2 22:47:01 2012 us=580300 remote_port = 10020
Fri Mar 2 22:47:01 2012 us=580306 remote_float = ENABLED
Fri Mar 2 22:47:01 2012 us=580311 bind_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=580317 bind_local = DISABLED
Fri Mar 2 22:47:01 2012 us=580322 connect_retry_seconds = 5
Fri Mar 2 22:47:01 2012 us=580328 connect_timeout = 10
Fri Mar 2 22:47:01 2012 us=580333 connect_retry_max = 0
Fri Mar 2 22:47:01 2012 us=580339 socks_proxy_server = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580344 socks_proxy_port = 0
Fri Mar 2 22:47:01 2012 us=580349 socks_proxy_retry = DISABLED
Fri Mar 2 22:47:01 2012 us=580355 Connection profiles [2]:
Fri Mar 2 22:47:01 2012 us=580361 proto = udp
Fri Mar 2 22:47:01 2012 us=580366 local = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580371 local_port = 0
Fri Mar 2 22:47:01 2012 us=580377 remote = 'anna.vpntunnel.se'
Fri Mar 2 22:47:01 2012 us=580383 remote_port = 1194
Fri Mar 2 22:47:01 2012 us=580388 remote_float = ENABLED
Fri Mar 2 22:47:01 2012 us=580394 bind_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=580399 bind_local = DISABLED
Fri Mar 2 22:47:01 2012 us=580404 connect_retry_seconds = 5
Fri Mar 2 22:47:01 2012 us=580410 connect_timeout = 10
Fri Mar 2 22:47:01 2012 us=580415 connect_retry_max = 0
Fri Mar 2 22:47:01 2012 us=580421 socks_proxy_server = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580430 socks_proxy_port = 0
Fri Mar 2 22:47:01 2012 us=580436 socks_proxy_retry = DISABLED
Fri Mar 2 22:47:01 2012 us=580442 Connection profiles END
Fri Mar 2 22:47:01 2012 us=580448 remote_random = ENABLED
Fri Mar 2 22:47:01 2012 us=580453 ipchange = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580459 dev = 'tun'
Fri Mar 2 22:47:01 2012 us=580464 dev_type = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580470 dev_node = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580475 lladdr = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580481 topology = 1
Fri Mar 2 22:47:01 2012 us=580486 tun_ipv6 = DISABLED
Fri Mar 2 22:47:01 2012 us=580492 ifconfig_local = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580497 ifconfig_remote_netmask = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580506 ifconfig_noexec = DISABLED
Fri Mar 2 22:47:01 2012 us=580512 ifconfig_nowarn = DISABLED
Fri Mar 2 22:47:01 2012 us=580518 shaper = 0
Fri Mar 2 22:47:01 2012 us=580523 tun_mtu = 1500
Fri Mar 2 22:47:01 2012 us=580529 tun_mtu_defined = ENABLED
Fri Mar 2 22:47:01 2012 us=580535 link_mtu = 1500
Fri Mar 2 22:47:01 2012 us=580540 link_mtu_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=580546 tun_mtu_extra = 0
Fri Mar 2 22:47:01 2012 us=580551 tun_mtu_extra_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=580557 fragment = 0
Fri Mar 2 22:47:01 2012 us=580562 mtu_discover_type = -1
Fri Mar 2 22:47:01 2012 us=580568 mtu_test = 0
Fri Mar 2 22:47:01 2012 us=580573 mlock = DISABLED
Fri Mar 2 22:47:01 2012 us=580579 keepalive_ping = 0
Fri Mar 2 22:47:01 2012 us=580584 keepalive_timeout = 0
Fri Mar 2 22:47:01 2012 us=580590 inactivity_timeout = 0
Fri Mar 2 22:47:01 2012 us=580595 ping_send_timeout = 0
Fri Mar 2 22:47:01 2012 us=580601 ping_rec_timeout = 0
Fri Mar 2 22:47:01 2012 us=580607 ping_rec_timeout_action = 0
Fri Mar 2 22:47:01 2012 us=580612 ping_timer_remote = DISABLED
Fri Mar 2 22:47:01 2012 us=580618 remap_sigusr1 = 0
Fri Mar 2 22:47:01 2012 us=580623 explicit_exit_notification = 0
Fri Mar 2 22:47:01 2012 us=580629 persist_tun = ENABLED
Fri Mar 2 22:47:01 2012 us=580634 persist_local_ip = DISABLED
Fri Mar 2 22:47:01 2012 us=580640 persist_remote_ip = DISABLED
Fri Mar 2 22:47:01 2012 us=580645 persist_key = ENABLED
Fri Mar 2 22:47:01 2012 us=580651 mssfix = 1450
Fri Mar 2 22:47:01 2012 us=580656 passtos = DISABLED
Fri Mar 2 22:47:01 2012 us=580662 resolve_retry_seconds = 1000000000
Fri Mar 2 22:47:01 2012 us=580668 username = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580673 groupname = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580679 chroot_dir = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580685 cd_dir = '/etc/openvpn'
Fri Mar 2 22:47:01 2012 us=580690 writepid = '/var/run/openvpn/openvpn-Swe.pid'
Fri Mar 2 22:47:01 2012 us=580696 up_script = '/usr/share/openvpn/update-resolv-conf'
Fri Mar 2 22:47:01 2012 us=580702 down_script = '/usr/share/openvpn/update-resolv-conf'
Fri Mar 2 22:47:01 2012 us=580707 down_pre = DISABLED
Fri Mar 2 22:47:01 2012 us=580713 up_restart = DISABLED
Fri Mar 2 22:47:01 2012 us=580719 up_delay = DISABLED
Fri Mar 2 22:47:01 2012 us=580724 daemon = ENABLED
Fri Mar 2 22:47:01 2012 us=580730 inetd = 0
Fri Mar 2 22:47:01 2012 us=580735 log = ENABLED
Fri Mar 2 22:47:01 2012 us=580741 suppress_timestamps = DISABLED
Fri Mar 2 22:47:01 2012 us=580747 nice = 0
Fri Mar 2 22:47:01 2012 us=580752 verbosity = 5
Fri Mar 2 22:47:01 2012 us=580758 mute = 0
Fri Mar 2 22:47:01 2012 us=580763 gremlin = 0
Fri Mar 2 22:47:01 2012 us=580769 status_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580774 status_file_version = 1
Fri Mar 2 22:47:01 2012 us=580780 status_file_update_freq = 60
Fri Mar 2 22:47:01 2012 us=580786 occ = ENABLED
Fri Mar 2 22:47:01 2012 us=580791 rcvbuf = 65536
Fri Mar 2 22:47:01 2012 us=580797 sndbuf = 65536
Fri Mar 2 22:47:01 2012 us=580803 sockflags = 0
Fri Mar 2 22:47:01 2012 us=580808 fast_io = DISABLED
Fri Mar 2 22:47:01 2012 us=580814 lzo = 7
Fri Mar 2 22:47:01 2012 us=580820 route_script = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580828 route_default_gateway = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580834 route_default_metric = 0
Fri Mar 2 22:47:01 2012 us=580840 route_noexec = DISABLED
Fri Mar 2 22:47:01 2012 us=580845 route_delay = 0
Fri Mar 2 22:47:01 2012 us=580851 route_delay_window = 30
Fri Mar 2 22:47:01 2012 us=580856 route_delay_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=580862 route_nopull = DISABLED
Fri Mar 2 22:47:01 2012 us=580868 route_gateway_via_dhcp = DISABLED
Fri Mar 2 22:47:01 2012 us=580873 max_routes = 100
Fri Mar 2 22:47:01 2012 us=580879 allow_pull_fqdn = DISABLED
Fri Mar 2 22:47:01 2012 us=580885 management_addr = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580890 management_port = 0
Fri Mar 2 22:47:01 2012 us=580896 management_user_pass = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580902 management_log_history_cache = 250
Fri Mar 2 22:47:01 2012 us=580907 management_echo_buffer_size = 100
Fri Mar 2 22:47:01 2012 us=580913 management_write_peer_info_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580918 management_client_user = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580924 management_client_group = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580930 management_flags = 0
Fri Mar 2 22:47:01 2012 us=580935 shared_secret_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=580941 key_direction = 0
Fri Mar 2 22:47:01 2012 us=580946 ciphername_defined = ENABLED
Fri Mar 2 22:47:01 2012 us=580952 ciphername = 'BF-CBC'
Fri Mar 2 22:47:01 2012 us=580957 authname_defined = ENABLED
Fri Mar 2 22:47:01 2012 us=580963 authname = 'SHA1'
Fri Mar 2 22:47:01 2012 us=580968 prng_hash = 'SHA1'
Fri Mar 2 22:47:01 2012 us=580974 prng_nonce_secret_len = 16
Fri Mar 2 22:47:01 2012 us=580979 keysize = 0
Fri Mar 2 22:47:01 2012 us=580985 engine = DISABLED
Fri Mar 2 22:47:01 2012 us=580990 replay = ENABLED
Fri Mar 2 22:47:01 2012 us=580996 mute_replay_warnings = DISABLED
Fri Mar 2 22:47:01 2012 us=581001 replay_window = 64
Fri Mar 2 22:47:01 2012 us=581007 replay_time = 15
Fri Mar 2 22:47:01 2012 us=581012 packet_id_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581018 use_iv = ENABLED
Fri Mar 2 22:47:01 2012 us=581023 test_crypto = DISABLED
Fri Mar 2 22:47:01 2012 us=581029 tls_server = DISABLED
Fri Mar 2 22:47:01 2012 us=581034 tls_client = ENABLED
Fri Mar 2 22:47:01 2012 us=581040 key_method = 2
Fri Mar 2 22:47:01 2012 us=581045 ca_file = '/etc/openvpn/keys/ca.crt'
Fri Mar 2 22:47:01 2012 us=581051 ca_path = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581057 dh_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581062 cert_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581068 priv_key_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581073 pkcs12_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581079 cipher_list = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581084 tls_verify = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581090 tls_export_cert = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581096 tls_remote = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581101 crl_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581107 ns_cert_type = 64
Fri Mar 2 22:47:01 2012 us=581112 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581118 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581123 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581129 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581134 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581140 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581145 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581150 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581156 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581161 remote_cert_ku = 0
Fri Mar 2 22:47:01 2012 us=581167 remote_cert_ku[i] = 0
Fri Mar 2 22:47:01 2012 us=581172 remote_cert_ku[i] = 0
Fri Mar 2 22:47:01 2012 us=581178 remote_cert_ku[i] = 0
Fri Mar 2 22:47:01 2012 us=581183 remote_cert_ku[i] = 0
Fri Mar 2 22:47:01 2012 us=581189 remote_cert_ku[i] = 0
Fri Mar 2 22:47:01 2012 us=581195 remote_cert_ku[i] = 0
Fri Mar 2 22:47:01 2012 us=581203 remote_cert_eku = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581209 tls_timeout = 2
Fri Mar 2 22:47:01 2012 us=581214 renegotiate_bytes = 0
Fri Mar 2 22:47:01 2012 us=581220 renegotiate_packets = 0
Fri Mar 2 22:47:01 2012 us=581225 renegotiate_seconds = 3600
Fri Mar 2 22:47:01 2012 us=581231 handshake_window = 60
Fri Mar 2 22:47:01 2012 us=581237 transition_window = 3600
Fri Mar 2 22:47:01 2012 us=581242 single_session = DISABLED
Fri Mar 2 22:47:01 2012 us=581248 push_peer_info = DISABLED
Fri Mar 2 22:47:01 2012 us=581254 tls_exit = DISABLED
Fri Mar 2 22:47:01 2012 us=581259 tls_auth_file = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581268 server_network = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581275 server_netmask = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581281 server_bridge_ip = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581288 server_bridge_netmask = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581294 server_bridge_pool_start = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581300 server_bridge_pool_end = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581306 ifconfig_pool_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=581312 ifconfig_pool_start = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581318 ifconfig_pool_end = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581324 ifconfig_pool_netmask = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581330 ifconfig_pool_persist_filename = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581336 ifconfig_pool_persist_refresh_freq = 600
Fri Mar 2 22:47:01 2012 us=581341 n_bcast_buf = 256
Fri Mar 2 22:47:01 2012 us=581347 tcp_queue_limit = 64
Fri Mar 2 22:47:01 2012 us=581352 real_hash_size = 256
Fri Mar 2 22:47:01 2012 us=581358 virtual_hash_size = 256
Fri Mar 2 22:47:01 2012 us=581364 client_connect_script = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581370 learn_address_script = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581375 client_disconnect_script = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581381 client_config_dir = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581386 ccd_exclusive = DISABLED
Fri Mar 2 22:47:01 2012 us=581392 tmp_dir = '/tmp'
Fri Mar 2 22:47:01 2012 us=581398 push_ifconfig_defined = DISABLED
Fri Mar 2 22:47:01 2012 us=581404 push_ifconfig_local = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581410 push_ifconfig_remote_netmask = 0.0.0.0
Fri Mar 2 22:47:01 2012 us=581416 enable_c2c = DISABLED
Fri Mar 2 22:47:01 2012 us=581421 duplicate_cn = DISABLED
Fri Mar 2 22:47:01 2012 us=581427 cf_max = 0
Fri Mar 2 22:47:01 2012 us=581433 cf_per = 0
Fri Mar 2 22:47:01 2012 us=581438 max_clients = 1024
Fri Mar 2 22:47:01 2012 us=581444 max_routes_per_client = 256
Fri Mar 2 22:47:01 2012 us=581450 auth_user_pass_verify_script = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581455 auth_user_pass_verify_script_via_file = DISABLED
Fri Mar 2 22:47:01 2012 us=581461 ssl_flags = 0
Fri Mar 2 22:47:01 2012 us=581467 port_share_host = '[UNDEF]'
Fri Mar 2 22:47:01 2012 us=581472 port_share_port = 0
Fri Mar 2 22:47:01 2012 us=581478 client = ENABLED
Fri Mar 2 22:47:01 2012 us=581483 pull = ENABLED
Fri Mar 2 22:47:01 2012 us=581489 auth_user_pass_file = '/etc/openvpn/pw/pw'
Fri Mar 2 22:47:01 2012 us=581495 OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [eurephia] built on Jan 3 2012
Fri Mar 2 22:47:01 2012 us=583907 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Fri Mar 2 22:47:01 2012 us=584798 LZO compression initialized
Fri Mar 2 22:47:01 2012 us=584857 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Fri Mar 2 22:47:01 2012 us=584881 Socket Buffers: R=[229376->131072] S=[229376->131072]
Fri Mar 2 22:47:01 2012 us=586698 RESOLVE: NOTE: anna.vpntunnel.se resolves to 4 addresses
Fri Mar 2 22:47:01 2012 us=586715 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Mar 2 22:47:01 2012 us=586730 Local Options String: 'V4,dev-type tun,link-mtu 1542,tun-mtu 1500,proto UDPv4,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client'
Fri Mar 2 22:47:01 2012 us=586739 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1542,tun-mtu 1500,proto UDPv4,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-server'
Fri Mar 2 22:47:01 2012 us=586754 Local Options hash (VER=V4): '41690919'
Fri Mar 2 22:47:01 2012 us=586763 Expected Remote Options hash (VER=V4): '530fdded'
Fri Mar 2 22:47:01 2012 us=586985 UDPv4 link local: [undef]
Fri Mar 2 22:47:01 2012 us=587017 UDPv4 link remote: 178.73.212.231:10020
WRFri Mar 2 22:47:01 2012 us=627247 TLS: Initial packet from 178.73.212.231:10020, sid=585704f7 efc54ddf
WFri Mar 2 22:47:01 2012 us=627315 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
WWWRRRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRFri Mar 2 22:47:01 2012 us=841046 VERIFY OK: depth=1, /C=SE/ST=CA/L=SanFrancisco/O=Fort-Funston/CN=Fort-Funston_CA/emailAddress=me@myhost.mydomain
Fri Mar 2 22:47:01 2012 us=841175 VERIFY OK: nsCertType=SERVER
Fri Mar 2 22:47:01 2012 us=841185 VERIFY OK: depth=0, /C=SE/ST=CA/L=SanFrancisco/O=Fort-Funston/CN=server/emailAddress=me@myhost.mydomain
WRWRWRWRWWRRWRWRWWWWRRRRWRWRFri Mar 2 22:47:01 2012 us=984838 WARNING: 'dev-type' is used inconsistently, local='dev-type tun', remote='dev-type tap'
Fri Mar 2 22:47:01 2012 us=984867 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1542', remote='link-mtu 1574'
Fri Mar 2 22:47:01 2012 us=984876 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1500', remote='tun-mtu 1532'
Fri Mar 2 22:47:01 2012 us=985030 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Mar 2 22:47:01 2012 us=985038 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Mar 2 22:47:01 2012 us=985083 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Mar 2 22:47:01 2012 us=985090 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
WFri Mar 2 22:47:01 2012 us=985120 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Fri Mar 2 22:47:01 2012 us=985137 [server] Peer Connection Initiated with 178.73.212.231:10020
RRRRRRRRRRRRRRRRRRRRRRRRRFri Mar 2 22:47:03 2012 us=60405 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
WRRWRWRFri Mar 2 22:47:03 2012 us=101880 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 80.67.0.2,dhcp-option DNS 91.213.246.2,redirect-gateway def1,route-gateway 178.73.219.1,ping 10,ping-restart 160,ifconfig 178.73.219.198 255.255.255.0'
Fri Mar 2 22:47:03 2012 us=101949 OPTIONS IMPORT: timers and/or timeouts modified
Fri Mar 2 22:47:03 2012 us=101958 OPTIONS IMPORT: --ifconfig/up options modified
Fri Mar 2 22:47:03 2012 us=101963 OPTIONS IMPORT: route options modified
Fri Mar 2 22:47:03 2012 us=101968 OPTIONS IMPORT: route-related options modified
Fri Mar 2 22:47:03 2012 us=101973 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Mar 2 22:47:03 2012 us=101984 WARNING: Since you are using --dev tun with a point-to-point topology, the second argument to --ifconfig must be an IP address. You are using something (255.255.255.0) that looks more like a netmask. (silence this warning with --ifconfig-nowarn)
Fri Mar 2 22:47:03 2012 us=102077 ROUTE default_gateway=192.168.2.1
Fri Mar 2 22:47:03 2012 us=104338 TUN/TAP device tun0 opened
Fri Mar 2 22:47:03 2012 us=104366 TUN/TAP TX queue length set to 100
Fri Mar 2 22:47:03 2012 us=104401 /usr/sbin/ip link set dev tun0 up mtu 1500
Fri Mar 2 22:47:03 2012 us=105614 /usr/sbin/ip addr add dev tun0 local 178.73.219.198 peer 255.255.255.0
Fri Mar 2 22:47:03 2012 us=106292 /usr/share/openvpn/update-resolv-conf tun0 1500 1542 178.73.219.198 255.255.255.0 init
dhcp-option DNS 80.67.0.2
dhcp-option DNS 91.213.246.2
Fri Mar 2 22:47:03 2012 us=142755 /usr/sbin/ip route add 178.73.212.231/32 via 192.168.2.1
Fri Mar 2 22:47:03 2012 us=143460 /usr/sbin/ip route add 0.0.0.0/1 via 178.73.219.1
RTNETLINK answers: No such process
Fri Mar 2 22:47:03 2012 us=144096 ERROR: Linux route add command failed: external program exited with error status: 2
Fri Mar 2 22:47:03 2012 us=144134 /usr/sbin/ip route add 128.0.0.0/1 via 178.73.219.1
RTNETLINK answers: No such process
Fri Mar 2 22:47:03 2012 us=144736 ERROR: Linux route add command failed: external program exited with error status: 2
Fri Mar 2 22:47:03 2012 us=144759 Initialization Sequence Completed
WRwFri Mar 2 22:47:03 2012 us=148344 write to TUN/TAP : Invalid argument (code=22)


After that, the last line is repeated indefinitely.

I looked for informations about the last line and people fixed it by adding "comp-lzo" in the client configuration file. Unfortunately, it's already there (see /etc/openvpn/openvpn-Swe.conf).

Does somedoy know what the problem is ?

Thank you.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: [ArchLinux] invalid argument code 22

Post by janjust » Fri Mar 02, 2012 10:13 pm

your client config does not match the server config (which you did not post) ; the log message
WARNING: 'dev-type' is used inconsistently, local='dev-type tun', remote='dev-type tap'
shows that you should us

Code: Select all

dev tap
on the client side.

Ichika
OpenVpn Newbie
Posts: 4
Joined: Fri Mar 02, 2012 9:44 pm

Re: [ArchLinux] invalid argument code 22

Post by Ichika » Fri Mar 02, 2012 10:20 pm

Okay thanks, that works fine now... I feel stupid.

But it's strange because it's the config file I got from the VPNTunnel.se website. I never touched this tun/tap thing, I just added the last lines.

Anyway, thanks it works. :)

Locked