web-dev-qa-db-ja.com

OpenVPN-ローカルアドレスでソケットバインドが失敗しました[AF_INET] IP:1194:要求されたアドレスを割り当てることができません

どのように解決しますか?ユーザー名:デモとパスワード:デモを使用してリモートでログインできるように、openVPNサーバーを起動しようとしていますが、openVPNサーバーが起動しません。

何が悪いのですか?どうすれば修正できますか?

$ cat /etc/openvpn/server.conf
proto tcp
port 1194
dev tap
#do-mtu 1492
#fragment 1300
dev-node tap
keepalive 10 120 
max-clients 10

# Annoying files 
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem

# Owner
user nobody
group nogroup
server 10.44.77.0 255.255.255.0

persist-key
persist-tun
status openvpn-status.log
verb 6

# Router
client-to-client
Push "dhcp-option DOMAIN xxxxx" # Server public IP or domain name
Push "dhcp-option DNS 208.67.222.222" # Primary dns server (opendns shown)
Push "dhcp-option DNS 208.67.220.220" # Secondary dns server (opendns shown)
Push "redirect-gateway" # Directs all traffic through your VPN
#log-append /var/log/openvpn
comp-lzo

# Username/password
auth-user-pass-verify /etc/openvpn/auth.sh via-env
client-cert-not-required
username-as-common-name
management-client-auth
management 8.8.8.8 1194 pass.txt

$ cat auth.sh
#/bin/sh
Allowed_user = "demo"
ALLOWED_PASS = "demo"

if ["$username" == "$Allowed_user"] && ["$password" == "$ALLOWED_PASS"]
 then exit 0
fi

exit 1

$ cat pass.txt  #chmod 600 pass.txt else it gives warning
demo demo; 

出力:

$ openvpn /etc/openvpn/server.conf 
Thu Aug 29 12:02:46 2013 us=863944 Current Parameter Settings:
Thu Aug 29 12:02:46 2013 us=864047   config = '/etc/openvpn/server.conf'
Thu Aug 29 12:02:46 2013 us=864075   mode = 1
Thu Aug 29 12:02:46 2013 us=864097   persist_config = DISABLED
Thu Aug 29 12:02:46 2013 us=864119   persist_mode = 1
Thu Aug 29 12:02:46 2013 us=864164   show_ciphers = DISABLED
Thu Aug 29 12:02:46 2013 us=864185   show_digests = DISABLED
Thu Aug 29 12:02:46 2013 us=864216   show_engines = DISABLED
Thu Aug 29 12:02:46 2013 us=864237   genkey = DISABLED
Thu Aug 29 12:02:46 2013 us=864259   key_pass_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864290   show_tls_ciphers = DISABLED
Thu Aug 29 12:02:46 2013 us=864323 Connection profiles [default]:
Thu Aug 29 12:02:46 2013 us=864346   proto = tcp-server
Thu Aug 29 12:02:46 2013 us=864366   local = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864398   local_port = 1194
Thu Aug 29 12:02:46 2013 us=864419   remote = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864451   remote_port = 1194
Thu Aug 29 12:02:46 2013 us=864471   remote_float = DISABLED
Thu Aug 29 12:02:46 2013 us=864492   bind_defined = DISABLED
Thu Aug 29 12:02:46 2013 us=864512   bind_local = ENABLED
Thu Aug 29 12:02:46 2013 us=864537   connect_retry_seconds = 5
Thu Aug 29 12:02:46 2013 us=864557   connect_timeout = 10
Thu Aug 29 12:02:46 2013 us=864581   connect_retry_max = 0
Thu Aug 29 12:02:46 2013 us=864604   socks_proxy_server = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864624   socks_proxy_port = 0
Thu Aug 29 12:02:46 2013 us=864647   socks_proxy_retry = DISABLED
Thu Aug 29 12:02:46 2013 us=864670 Connection profiles END
Thu Aug 29 12:02:46 2013 us=864695   remote_random = DISABLED
Thu Aug 29 12:02:46 2013 us=864719   ipchange = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864742   dev = 'tap'
Thu Aug 29 12:02:46 2013 us=864762   dev_type = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864785   dev_node = 'tap'
Thu Aug 29 12:02:46 2013 us=864809   lladdr = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864829   topology = 1
Thu Aug 29 12:02:46 2013 us=864850   tun_ipv6 = DISABLED
Thu Aug 29 12:02:46 2013 us=864878   ifconfig_local = '10.44.77.1'
Thu Aug 29 12:02:46 2013 us=864902   ifconfig_remote_netmask = '255.255.255.0'
Thu Aug 29 12:02:46 2013 us=864925   ifconfig_noexec = DISABLED
Thu Aug 29 12:02:46 2013 us=864946   ifconfig_nowarn = DISABLED
Thu Aug 29 12:02:46 2013 us=864966   ifconfig_ipv6_local = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=864990   ifconfig_ipv6_netbits = 0
Thu Aug 29 12:02:46 2013 us=865013   ifconfig_ipv6_remote = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=865036   shaper = 0
Thu Aug 29 12:02:46 2013 us=865057   tun_mtu = 1500
Thu Aug 29 12:02:46 2013 us=865077   tun_mtu_defined = ENABLED
Thu Aug 29 12:02:46 2013 us=865106   link_mtu = 1500
Thu Aug 29 12:02:46 2013 us=865129   link_mtu_defined = DISABLED
Thu Aug 29 12:02:46 2013 us=865152   tun_mtu_extra = 32
Thu Aug 29 12:02:46 2013 us=865172   tun_mtu_extra_defined = ENABLED
Thu Aug 29 12:02:46 2013 us=865193   fragment = 0
Thu Aug 29 12:02:46 2013 us=865221   mtu_discover_type = -1
Thu Aug 29 12:02:46 2013 us=865244   mtu_test = 0
Thu Aug 29 12:02:46 2013 us=865266   mlock = DISABLED
Thu Aug 29 12:02:46 2013 us=865289   keepalive_ping = 10
Thu Aug 29 12:02:46 2013 us=865309   keepalive_timeout = 120
Thu Aug 29 12:02:46 2013 us=865330   inactivity_timeout = 0
Thu Aug 29 12:02:46 2013 us=865350   ping_send_timeout = 10
Thu Aug 29 12:02:46 2013 us=865378   ping_rec_timeout = 240
Thu Aug 29 12:02:46 2013 us=865401   ping_rec_timeout_action = 2
Thu Aug 29 12:02:46 2013 us=865422   ping_timer_remote = DISABLED
Thu Aug 29 12:02:46 2013 us=865442   remap_sigusr1 = 0
Thu Aug 29 12:02:46 2013 us=865470   explicit_exit_notification = 0
Thu Aug 29 12:02:46 2013 us=865493   persist_tun = ENABLED
Thu Aug 29 12:02:46 2013 us=865513   persist_local_ip = DISABLED
Thu Aug 29 12:02:46 2013 us=865535   persist_remote_ip = DISABLED
Thu Aug 29 12:02:46 2013 us=865558   persist_key = ENABLED
Thu Aug 29 12:02:46 2013 us=865584   mssfix = 1450
Thu Aug 29 12:02:46 2013 us=865609   passtos = DISABLED
Thu Aug 29 12:02:46 2013 us=865632   resolve_retry_seconds = 1000000000
Thu Aug 29 12:02:46 2013 us=865653   username = 'nobody'
Thu Aug 29 12:02:46 2013 us=865673   groupname = 'nogroup'
Thu Aug 29 12:02:46 2013 us=865692   chroot_dir = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=865711   cd_dir = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=865731   writepid = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=865750   up_script = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=865770   down_script = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=865789   down_pre = DISABLED
Thu Aug 29 12:02:46 2013 us=865809   up_restart = DISABLED
Thu Aug 29 12:02:46 2013 us=865828   up_delay = DISABLED
Thu Aug 29 12:02:46 2013 us=865848   daemon = DISABLED
Thu Aug 29 12:02:46 2013 us=865867   inetd = 0
Thu Aug 29 12:02:46 2013 us=865887   log = DISABLED
Thu Aug 29 12:02:46 2013 us=865906   suppress_timestamps = DISABLED
Thu Aug 29 12:02:46 2013 us=865926   Nice = 0
Thu Aug 29 12:02:46 2013 us=865946   verbosity = 6
Thu Aug 29 12:02:46 2013 us=865965   mute = 0
Thu Aug 29 12:02:46 2013 us=865985   gremlin = 0
Thu Aug 29 12:02:46 2013 us=866004   status_file = 'openvpn-status.log'
Thu Aug 29 12:02:46 2013 us=866024   status_file_version = 1
Thu Aug 29 12:02:46 2013 us=866044   status_file_update_freq = 60
Thu Aug 29 12:02:46 2013 us=866064   occ = ENABLED
Thu Aug 29 12:02:46 2013 us=866083   rcvbuf = 65536
Thu Aug 29 12:02:46 2013 us=866103   sndbuf = 65536
Thu Aug 29 12:02:46 2013 us=866122   sockflags = 0
Thu Aug 29 12:02:46 2013 us=866142   fast_io = DISABLED
Thu Aug 29 12:02:46 2013 us=866161   lzo = 7
Thu Aug 29 12:02:46 2013 us=866181   route_script = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=866201   route_default_gateway = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=866221   route_default_metric = 0
Thu Aug 29 12:02:46 2013 us=866241   route_noexec = DISABLED
Thu Aug 29 12:02:46 2013 us=866261   route_delay = 0
Thu Aug 29 12:02:46 2013 us=866282   route_delay_window = 30
Thu Aug 29 12:02:46 2013 us=866302   route_delay_defined = DISABLED
Thu Aug 29 12:02:46 2013 us=866323   route_nopull = DISABLED
Thu Aug 29 12:02:46 2013 us=866343   route_gateway_via_dhcp = DISABLED
Thu Aug 29 12:02:46 2013 us=866364   max_routes = 100
Thu Aug 29 12:02:46 2013 us=866383   allow_pull_fqdn = DISABLED
Thu Aug 29 12:02:46 2013 us=866404   management_addr = 'xxxxxxxxx'
Thu Aug 29 12:02:46 2013 us=866424   management_port = 1194
Thu Aug 29 12:02:46 2013 us=866444   management_user_pass = 'pass.txt'
Thu Aug 29 12:02:46 2013 us=866464   management_log_history_cache = 250
Thu Aug 29 12:02:46 2013 us=866483   management_echo_buffer_size = 100
Thu Aug 29 12:02:46 2013 us=866504   management_write_peer_info_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=866524   management_client_user = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=866544   management_client_group = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=866564   management_flags = 64
Thu Aug 29 12:02:46 2013 us=866583   shared_secret_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=866603   key_direction = 0
Thu Aug 29 12:02:46 2013 us=866623   ciphername_defined = ENABLED
Thu Aug 29 12:02:46 2013 us=866643   ciphername = 'BF-CBC'
Thu Aug 29 12:02:46 2013 us=866663   authname_defined = ENABLED
Thu Aug 29 12:02:46 2013 us=866683   authname = 'SHA1'
Thu Aug 29 12:02:46 2013 us=866702   prng_hash = 'SHA1'
Thu Aug 29 12:02:46 2013 us=866722   prng_nonce_secret_len = 16
Thu Aug 29 12:02:46 2013 us=866742   keysize = 0
Thu Aug 29 12:02:46 2013 us=866761   engine = DISABLED
Thu Aug 29 12:02:46 2013 us=866790   replay = ENABLED
Thu Aug 29 12:02:46 2013 us=866810   mute_replay_warnings = DISABLED
Thu Aug 29 12:02:46 2013 us=866830   replay_window = 64
Thu Aug 29 12:02:46 2013 us=866850   replay_time = 15
Thu Aug 29 12:02:46 2013 us=866869   packet_id_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=866899   use_iv = ENABLED
Thu Aug 29 12:02:46 2013 us=866919   test_crypto = DISABLED
Thu Aug 29 12:02:46 2013 us=866939   tls_server = ENABLED
Thu Aug 29 12:02:46 2013 us=866973   tls_client = DISABLED
Thu Aug 29 12:02:46 2013 us=867007   key_method = 2
Thu Aug 29 12:02:46 2013 us=867047   ca_file = '/etc/openvpn/keys/ca.crt'
Thu Aug 29 12:02:46 2013 us=867068   ca_path = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867088   dh_file = '/etc/openvpn/keys/dh1024.pem'
Thu Aug 29 12:02:46 2013 us=867108   cert_file = '/etc/openvpn/keys/server.crt'
Thu Aug 29 12:02:46 2013 us=867129   priv_key_file = '/etc/openvpn/keys/server.key'
Thu Aug 29 12:02:46 2013 us=867149   pkcs12_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867168   cipher_list = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867188   tls_verify = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867207   tls_export_cert = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867227   tls_remote = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867246   crl_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867266   ns_cert_type = 0
Thu Aug 29 12:02:46 2013 us=867285   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867304   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867323   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867342   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867361   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867380   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867398   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867417   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867436   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867455   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867473   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867492   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867511   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867529   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867548   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867567   remote_cert_ku[i] = 0
Thu Aug 29 12:02:46 2013 us=867587   remote_cert_eku = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867606   tls_timeout = 2
Thu Aug 29 12:02:46 2013 us=867625   renegotiate_bytes = 0
Thu Aug 29 12:02:46 2013 us=867644   renegotiate_packets = 0
Thu Aug 29 12:02:46 2013 us=867663   renegotiate_seconds = 3600
Thu Aug 29 12:02:46 2013 us=867681   handshake_window = 60
Thu Aug 29 12:02:46 2013 us=867701   transition_window = 3600
Thu Aug 29 12:02:46 2013 us=867720   single_session = DISABLED
Thu Aug 29 12:02:46 2013 us=867743   Push_peer_info = DISABLED
Thu Aug 29 12:02:46 2013 us=867764   tls_exit = DISABLED
Thu Aug 29 12:02:46 2013 us=867784   tls_auth_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=867803   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867823   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867843   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867862   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867882   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867902   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867922   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867941   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867960   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867980   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=867999   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=868019   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=868038   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=868057   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=868077   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=868097   pkcs11_protected_authentication = DISABLED
Thu Aug 29 12:02:46 2013 us=868117   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868137   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868157   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868177   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868196   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868215   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868234   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868254   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868273   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868292   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868311   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868330   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868350   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868369   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868388   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868408   pkcs11_private_mode = 00000000
Thu Aug 29 12:02:46 2013 us=868427   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868446   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868465   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868484   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868504   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868522   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868541   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868561   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868580   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868599   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868618   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868637   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868656   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868675   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868694   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868713   pkcs11_cert_private = DISABLED
Thu Aug 29 12:02:46 2013 us=868733   pkcs11_pin_cache_period = -1
Thu Aug 29 12:02:46 2013 us=868746   pkcs11_id = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=868767   pkcs11_id_management = DISABLED
Thu Aug 29 12:02:46 2013 us=868789   server_network = 10.44.77.0
Thu Aug 29 12:02:46 2013 us=868810   server_netmask = 255.255.255.0
Thu Aug 29 12:02:46 2013 us=868839   server_network_ipv6 = ::
Thu Aug 29 12:02:46 2013 us=868859   server_netbits_ipv6 = 0
Thu Aug 29 12:02:46 2013 us=868880   server_bridge_ip = 0.0.0.0
Thu Aug 29 12:02:46 2013 us=868901   server_bridge_netmask = 0.0.0.0
Thu Aug 29 12:02:46 2013 us=868922   server_bridge_pool_start = 0.0.0.0
Thu Aug 29 12:02:46 2013 us=868943   server_bridge_pool_end = 0.0.0.0
Thu Aug 29 12:02:46 2013 us=868963   Push_entry = 'dhcp-option DOMAIN xxxxxxxxxxx'
Thu Aug 29 12:02:46 2013 us=868983   Push_entry = 'dhcp-option DNS 208.67.222.222'
Thu Aug 29 12:02:46 2013 us=869003   Push_entry = 'dhcp-option DNS 208.67.220.220'
Thu Aug 29 12:02:46 2013 us=869023   Push_entry = 'redirect-gateway'
Thu Aug 29 12:02:46 2013 us=869043   Push_entry = 'route-gateway 10.44.77.1'
Thu Aug 29 12:02:46 2013 us=869062   Push_entry = 'ping 10'
Thu Aug 29 12:02:46 2013 us=869082   Push_entry = 'ping-restart 120'
Thu Aug 29 12:02:46 2013 us=869101   ifconfig_pool_defined = ENABLED
Thu Aug 29 12:02:46 2013 us=869123   ifconfig_pool_start = 10.44.77.2
Thu Aug 29 12:02:46 2013 us=869144   ifconfig_pool_end = 10.44.77.254
Thu Aug 29 12:02:46 2013 us=869165   ifconfig_pool_netmask = 255.255.255.0
Thu Aug 29 12:02:46 2013 us=869185   ifconfig_pool_persist_filename = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=869205   ifconfig_pool_persist_refresh_freq = 600
Thu Aug 29 12:02:46 2013 us=869224   ifconfig_ipv6_pool_defined = DISABLED
Thu Aug 29 12:02:46 2013 us=869245   ifconfig_ipv6_pool_base = ::
Thu Aug 29 12:02:46 2013 us=869264   ifconfig_ipv6_pool_netbits = 0
Thu Aug 29 12:02:46 2013 us=869284   n_bcast_buf = 256
Thu Aug 29 12:02:46 2013 us=869303   tcp_queue_limit = 64
Thu Aug 29 12:02:46 2013 us=869322   real_hash_size = 256
Thu Aug 29 12:02:46 2013 us=869342   virtual_hash_size = 256
Thu Aug 29 12:02:46 2013 us=869361   client_connect_script = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=869380   learn_address_script = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=869400   client_disconnect_script = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=869420   client_config_dir = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=869439   ccd_exclusive = DISABLED
Thu Aug 29 12:02:46 2013 us=869458   tmp_dir = '/tmp'
Thu Aug 29 12:02:46 2013 us=869478   Push_ifconfig_defined = DISABLED
Thu Aug 29 12:02:46 2013 us=869499   Push_ifconfig_local = 0.0.0.0
Thu Aug 29 12:02:46 2013 us=869519   Push_ifconfig_remote_netmask = 0.0.0.0
Thu Aug 29 12:02:46 2013 us=869539   Push_ifconfig_ipv6_defined = DISABLED
Thu Aug 29 12:02:46 2013 us=869560   Push_ifconfig_ipv6_local = ::/0
Thu Aug 29 12:02:46 2013 us=869580   Push_ifconfig_ipv6_remote = ::
Thu Aug 29 12:02:46 2013 us=869599   enable_c2c = ENABLED
Thu Aug 29 12:02:46 2013 us=869619   duplicate_cn = DISABLED
Thu Aug 29 12:02:46 2013 us=869638   cf_max = 0
Thu Aug 29 12:02:46 2013 us=869657   cf_per = 0
Thu Aug 29 12:02:46 2013 us=869676   max_clients = 10
Thu Aug 29 12:02:46 2013 us=869696   max_routes_per_client = 256
Thu Aug 29 12:02:46 2013 us=869715   auth_user_pass_verify_script = '/etc/openvpn/auth.sh'
Thu Aug 29 12:02:46 2013 us=869735   auth_user_pass_verify_script_via_file = DISABLED
Thu Aug 29 12:02:46 2013 us=869754   ssl_flags = 3
Thu Aug 29 12:02:46 2013 us=869773   port_share_Host = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=869793   port_share_port = 0
Thu Aug 29 12:02:46 2013 us=869812   client = DISABLED
Thu Aug 29 12:02:46 2013 us=869831   pull = DISABLED
Thu Aug 29 12:02:46 2013 us=869850   auth_user_pass_file = '[UNDEF]'
Thu Aug 29 12:02:46 2013 us=869877 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Feb 27 2013
Thu Aug 29 12:02:46 2013 us=870025 MANAGEMENT: Socket bind failed on local address [AF_INET]xxxxx:1194: Cannot assign requested address
Thu Aug 29 12:02:46 2013 us=870058 Exiting
6
user11085

同じ問題があり、「local xxx.xxx.xxx.xxx」という行を削除することで解決できました。 server.confから。

via

6
FelikZ

Openvpn構成ファイルから「ローカル」ディレクティブを削除することは、適切な解決策ではありません。 openvpnデーモンに、このディレクティブの要点である1つのネットワークインターフェイスのみにバインドする必要がある場合はどうなりますか?

問題の原因は、サーバーのネットワークインターフェースがそのうちの1つだけにバインドできる状態に達する前に、openvpnデーモンが早く起動しようとしていることです。 openvpnのデフォルトのinitスクリプトを見ると、ネットワークが使用可能になるまで待機するように構成されていることがわかります(「network.target」で暗黙的に示されています)。

[root@krampus ~]# grep After /usr/lib/systemd/system/openvpn\@.service
After=network.target

使用可能なネットワークは、すべてのインターフェースにバインドする場合(「local」ディレクティブが構成から削除される場合)に十分であるように見えますが、特定のインターフェースにバインドする場合はそうではありません。

私にとってうまくいった修正は、次のように「network.target」の代わりに「network-online.target」を使用してネットワークが完全にオンラインになるのを待つようにinitスクリプトを変更することでした:

[root@krampus ~]# grep After /usr/lib/systemd/system/openvpn\@.service
After=network-online.target
5
Brian Warren

エラー行:

Thu Aug 29 12:02:46 2013 us=870025 MANAGEMENT: Socket bind failed on local address 
    [AF_INET]xxxxx:1194: Cannot assign requested address

問題の手がかりです。すでにポート1194でリッスンしているプロセスがあると思います。netstat -pntaでそれを確認し、1194が状態LISTENプロセスとしてリストされているかどうかを確認できます。

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address     Foreign Address    State        PID/Program name
tcp        0      0 10.0.0.1:22       10.0.0.2:48346     ESTABLISHED  301/12  
tcp        0      0 10.44.77.1:1194   0.0.0.0:*          LISTEN       5998/mrfoo      

探している出力は、その出力の最終行のようになります。プロセスの名前とプロセスのPID(最後の列)が表示されるので、必要に応じて終了できます。必要なプロセスの場合は、VPN構成に新しい未使用のポートを割り当てます。

2
Drav Sloan

私は今日、サーバー側でXenial(16.04)を使用してこれと戦っていました。したがって、私は解決策を考え出す必要があり、上記のどれも適用できませんでした。

  1. Nuke OpenVPNの自動起動構成ファイルの名前がserver.confであると想定して、私は次の方法を使用しました。

    Sudo nano /etc/default/openvpn
    

    AUTOSTART=が含まれている行にコメントを付け、先頭に#を付けて残しました:AUTOSTART = "none"

  2. Openvpn起動スクリプトを置き換える

    次に、/etc/network/if.up.d/openvpnのopenvpnスクリプトを次のように置き換えました。

    #!/bin/sh
    
    MYOPENVPN=server
    OPENVPN=/usr/sbin/openvpn
    SYSTEMCTL=/bin/systemctl
    
    if [ ! -x $OPENVPN ]; then
    exit 0
    fi
    
    $SYSTEMCTL start openvpn@$MYOPENVPN.service
    
    exit 0
    

    MYOPNVPNは構成ファイルの名前であり、/etc/openvpnに格納され、.conf拡張を省略しています。自分の名前に置き換えてください。

    最初から行う場合は、次のことを忘れないでください。

    Sudo chmod +x /etc/network/if.up.d/openvpn
    

    先に進む前に、現在の/etc/network/if.up.d/openvpnスクリプトのコピーを作成することをお勧めします。

    Sudo cp /etc/network/if.up.d/openvpn /etc/network/if.up.d/openvpn.old
    
  3. 再起動、それは動作するはずです


私はこれをポルトガル語でここに投稿しました:

http://ajoliveira.com/ajoliveira/pt/software/openvpn_xenial.php

Raspberry Pi 2モデルBでは、local 192.168...から/etc/openvpn/server.conf行を削除すると、この問題が修正されました。これについての詳細は https://bbs.archlinux.org/viewtopic.php?id=183818 を参照してください。

1
Jeff Bondono

管理行は単に「management 1194 pass.txt」ではないのですか?

私はあなたがそこでGoogleのパブリックDNSサーバーをリッスンしようとしていると思います、そしてあなたがグーグルでない限り、それはおそらく良い考えではありません:*)

0
Andrew Ness

2019年にこれを読んでいてUbuntu 16.xまたは18.xを使用している場合、特に複数のIPを実行している場合、libvirt/kvmホスト、またはOpenVPNインスタンスが指定された単一のポートでのみリッスンすることを期待し、次のエラーが発生しました:

ローカルアドレス[AF_INET] XXX.XXX.XXX.XXX:10e94でソケットバインドが失敗しました:要求されたアドレスを割り当てることができません

他のすべての答えは不正確または貧弱なソリューションです。正しいソリューションは次のとおりです。

/ etc/default/openvpn

AUTOSTART="none"

/ etc/network/interfaces

iface ethX inet static
  address XXX.XXX.XXX.XX
  netmask 255.255.255.0
  openvpn my_vpn_name

ここで、ethXはインターフェースです(例:通常のインターフェースの場合はeth0、インターフェースのエイリアスの場合はeth0:1)。my_vpn_nameは、.confサフィックスのないベースファイル名です。 / etc/openvpn/my_vpn_name.confファイル。

説明すると、上記ではスクリプト/ etc/network/if-up.d/openvpnが実行され、これが順番に実行されますsystemctl --no-block start openvpn @ my_vpn_nameこれは、インターフェースまたはエイリアスが起動した後にopenvpnを起動します。

他の回答が貧弱または不正確であると言うのはなぜですか?不必要に複雑であるか、openvpnインスタンスにすべてのIPをリッスンするように指示する必要があるためです。これは明らかな理由で非常に望ましくありません。

0
Nanzikambe