TCP/UDP: Socket bind failed on local address
Posted: Tue Feb 09, 2016 3:16 pm
Hello you all!
I'm a new at this but thought I could install openvpn myself on my Rpi (Raspian). Unfortunately, after following the tutorial on readwrite.com, I cannot connect to the server from my client computer. The error I get while connecting is:
This is the error I get in the openvpn.log file:
This is the return of ifconfig of my pi:
This is my server.con file:
This is my Default.txt file:
Could anyone help me with this? Thank you so much!
I'm a new at this but thought I could install openvpn myself on my Rpi (Raspian). Unfortunately, after following the tutorial on readwrite.com, I cannot connect to the server from my client computer. The error I get while connecting is:
Code: Select all
2016-02-09 15:48:08 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
2016-02-09 15:48:08 TLS Error: TLS handshake failed
Code: Select all
Tue Feb 9 14:27:13 2016 us=826311 TCP/UDP: Socket bind failed on local address [AF_INET]192.168.2.16:1194: Cannot assign requested address
Tue Feb 9 14:27:13 2016 us=826385 Exiting due to fatal error
Code: Select all
eth0 Link encap:Ethernet HWaddr b8:27:eb:cc:a1:52
inet addr:192.168.2.16 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::39bd:5569:863a:c9a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:132850 errors:0 dropped:2 overruns:0 frame:0
TX packets:3977 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20157767 (19.2 MiB) TX bytes:635099 (620.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:200 errors:0 dropped:0 overruns:0 frame:0
TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16656 (16.2 KiB) TX bytes:16656 (16.2 KiB)
Code: Select all
local 192.168.2.16 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
dev tun
proto udp #Some people prefer to use tcp. Don't change it if you don't know.
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/Home.crt # SWAP WITH YOUR CRT NAME
key /etc/openvpn/easy-rsa/keys/Home.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here!
server 10.8.0.0 255.255.255.0
# server and remote endpoints
ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OpenVPN Subnet
push "route 10.8.0.0 255.255.255.0"
# your local subnet
push "route 192.168.2.16 255.255.255.0" # SWAP THE IP NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
# Set primary domain name server address to the SOHO Router
# If your router does not do DNS, you can use Google DNS 8.8.8.8
push "dhcp-option DNS 192.168.2.254" # This should already match your router address and not need to be changed.
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
duplicate-cn
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log /var/log/openvpn.log
verb 5
Code: Select all
Client
dev tun
proto udp
remote MY PUBLIC-IP 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20