Code: Select all
# Basic
local 192.168.1.13
port 1194
keepalive 10 120
max-clients 1
status openvpn-status.log
verb 6
# Bridge mode
proto udp
dev tap
dev-node tap
#server 10.44.77.0 255.255.255.0
server-bridge 192.168.1.13 255.255.255.0 192.168.1.100 192.168.1.110
# Annoying files
ca /etc/openvpn/keys/ca.crt # Path of ca.crt file you generated
cert /etc/openvpn/keys/server.crt # Path of certificate you generated
key /etc/openvpn/keys/server.key # Path of key file you generated
dh /etc/openvpn/keys/dh1024.pem # Path of dh file you generated
# Ownder
user nobody
group nogroup
persist-key
persist-tun
# Router
client-to-client
push "dhcp-option DOMAIN 82.143.92.20"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
push "redirect-gateway"
comp-lzo
# UserName Password
#cat /etc/openvpn/auth.sh < \EOF
##/bin/sh
#Allowed_user = "demo"; ALLOWED_PASS = "demo"
#if ["$username" == "$Allowed_user"] && ["$password" == "$ALLOWED_PASS"]
# then exit 0
#fi
#exit 1
#EOF
auth-user-pass-verify /etc/openvpn/auth.sh via-env
client-cert-not-required
username-as-common-name
management-client-auth
management localhost 1194 pass.txt # echo "username password;" > pass.txtClient config:
Code: Select all
client
dev tap
dev-node client
proto udp
port 1194
fragment 1300
remote 192.168.1.13
# Annoying files
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
auth-user-pass
ns-cert-type server
#Bind to
keepalive 10 120
persist-key
persist-tun
comp-lzo
verb 3
mute 20Code: Select all
Thu Aug 29 17:37:41 2013 us=677711 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 17:37:41 2013 us=677948 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:1194
Thu Aug 29 17:37:41 2013 us=678013 NOTE: when bridging your LAN adapter with the TAP adapter, note that the new bridge adapter will often take on its own IP address that is different from what the LAN adapter was previously set to
Thu Aug 29 17:37:41 2013 us=678080 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Thu Aug 29 17:37:41 2013 us=680594 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Aug 29 17:37:41 2013 us=681694 Diffie-Hellman initialized with 1024 bit key
Thu Aug 29 17:37:41 2013 us=682129 WARNING: POTENTIALLY DANGEROUS OPTION --client-cert-not-required may accept clients which do not present a certificate
Thu Aug 29 17:37:41 2013 us=682159 TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Thu Aug 29 17:37:41 2013 us=682182 Socket Buffers: R=[212992->131072] S=[212992->131072]
Thu Aug 29 17:37:41 2013 us=682208 Note: Cannot open TUN/TAP dev tap: No such file or directory (errno=2)
Thu Aug 29 17:37:41 2013 us=682226 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ]
Thu Aug 29 17:37:41 2013 us=682488 GID set to nogroup
Thu Aug 29 17:37:41 2013 us=682503 UID set to nobody
Thu Aug 29 17:37:41 2013 us=682518 UDPv4 link local (bound): [AF_INET]192.168.1.13:1194
Thu Aug 29 17:37:41 2013 us=682527 UDPv4 link remote: [undef]
Thu Aug 29 17:37:41 2013 us=682539 MULTI: multi_init called, r=256 v=256
Thu Aug 29 17:37:41 2013 us=682559 IFCONFIG POOL: base=192.168.1.100 size=11, ipv6=0
Thu Aug 29 17:37:41 2013 us=682583 Initialization Sequence CompletedCode: Select all
sun@sun-M14xR2:~/jssip$ sudo openvpn --config /etc/openvpn/client.conf
[sudo] password for sun:
Thu Aug 29 17:38:47 2013 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
Enter Auth Username:demo
Enter Auth Password:
Thu Aug 29 17:38:56 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Aug 29 17:38:56 2013 LZO compression initialized
Thu Aug 29 17:38:56 2013 Control Channel MTU parms [ L:1578 D:138 EF:38 EB:0 ET:0 EL:0 ]
Thu Aug 29 17:38:56 2013 Socket Buffers: R=[212992->131072] S=[212992->131072]
Thu Aug 29 17:38:56 2013 TCP/UDP: Socket bind failed on local address [undef]: Address already in use
Thu Aug 29 17:38:56 2013 Exiting

