Milí majitelé routerů Turris,
toto fórum bylo 9. 12. 2016 zmrazeno a nahrazeno naším novým Turris fórem. Ještě chvíli bude dostupné k prohlížení, ale již zde není možné přispívat. Více informací naleznete v oznámení o uzavření fóra.
Dear Turris routers users,
this forum has been frozen on Dec 9th, 2016 and replaced by our new Turris forum. It will be read-only accessible for some time after. For more information, read the announcement about closing the forum.
ps | grep vpn
nic nenajde/etc/init.d/openvpn start
/etc/config/openvpn
config 'openvpn' 'lan'
option 'enable' '1'
option 'tls_server' '1'
option 'port' '443'
option 'proto' 'tcp'
option 'dev' 'tap0'
option 'ca' '/etc/easy-rsa/keys/ca.crt'
option 'cert' '/etc/easy-rsa/keys/server.crt'
option 'key' '/etc/easy-rsa/keys/server.key'
option 'dh' '/etc/easy-rsa/keys/dh1024.pem'
option 'server_bridge' '192.168.55.1 255.255.255.0 192.168.55.221 192.168.55.240' # IP adresy: IP adresa Turrisu | Prvni pridelena adresa pro OpenVPN | Posledni pridelena adresa pro OpenVPN
list 'push' 'dhcp-option DNS 192.168.55.1' # OpenVPN klient bude pouzivat DNS Turrisu
list 'push' 'redirect-gateway def1' # Tohle nejspis chcete vynechat, jinak vsechen vas traffic potece pres Turris gateway
option 'client_to_client' '1'
option 'comp_lzo' 'yes'
option 'keepalive' '10 120'
option 'status' '/tmp/openvpn_tap0.status'
option 'persist_key' '1'
option 'persist_tun' '1'
option 'verb' '3'
option 'mute' '20'
config openvpn lan
root@turris:~# openvpn /etc/config/openvpn
Options error: In /etc/config/openvpn:21: Error opening configuration file: openvpn
Use --help for more information.
option enable 1
root@turris:~# openvpn /etc/config/openvpn
Options error: Unrecognized option or missing parameter(s) in /etc/config/openvpn:24: option (2.3.6)
> root@turris:~# openvpn /etc/config/openvpn
> Options error: In /etc/config/openvpn:21: Error opening configuration file: openvpn
> Use --help for more information.
/etc/config/openvpn
je ve formátu UCI, ze kterého se spouštěcím skriptem vygeneruje konfigurační soubor v nativním formátu OpenVPN na cestě /var/etc/openvpn-*.conf
./etc/init.d/openvpn start
tak se stane co? To už by mělo přinejmenším vygenerovat konfigurační soubor a zapsat něco do logu.
root@turris:/etc/config# cat openvpn
config 'openvpn' 'lan'
option 'enable' '1'
option 'tls_server' '1'
option 'port' '1194'
option 'proto' 'tcp'
option 'dev' 'tap0'
option 'ca' '/etc/openvpn/ca.crt'
option 'cert' '/etc/openvpn/server.crt'
option 'key' '/etc/openvpn/server.key'
option 'dh' '/etc/openvpn/dh1024.pem'
option 'server_bridge' '10.0.0.138 255.255.255.0 10.0.0.10 10.0.0.50' # IP adresy: IP adresa Turrisu | Prvni pridelena adresa pro OpenVPN | Posledni pridelena adresa pro OpenVPN
list 'push' 'dhcp-option DNS 10.0.0.138' # OpenVPN klient bude pouzivat DNS Turrisu
list 'push' 'redirect-gateway def1' # Tohle nejspis chcete vynechat, jinak vsechen vas traffic potece pres Turris gateway
option 'client_to_client' '1'
option 'comp_lzo' 'yes'
option 'keepalive' '10 120'
option 'status' '/tmp/openvpn_tap0.status'
option 'persist_key' '1'
option 'persist_tun' '1'
option 'verb' '3'
> V adresari /etc/openvpn vygenerovany soubor nevidim
/var/etc/
. V logu /var/log/messages
bude určitě napsáno, proč se služba OpenVPN ukončila.
root@turris:/tmp/etc# cat openvpn-lan.conf
client-to-client
persist-key
persist-tun
tls-server
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
comp-lzo yes
dev tap0
dh /etc/openvpn/dh1024.pem
keepalive 10 120
key /etc/openvpn/server.key
mute 20
port 1194
proto tcp
server-bridge 10.0.0.138 255.255.255.0 10.0.0.10 10.0.0.50
status /tmp/openvpn_tap0.status
verb 3
push dhcp-option DNS 10.0.0.138
push redirect-gateway def1
2015-10-30T17:27:08+01:00 notice openvpn(lan)[27140]: OpenVPN 2.3.6 powerpc-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Sep 14 2015
2015-10-30T17:27:08+01:00 notice openvpn(lan)[27140]: library versions: OpenSSL 1.0.2d 9 Jul 2015, LZO 2.08
2015-10-30T17:27:08+01:00 warning openvpn(lan)[27140]: 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
2015-10-30T17:27:08+01:00 err openvpn(lan)[27140]: Cannot open /etc/openvpn/dh1024.pem for DH parameters: error:02001002:lib(2):func(1):reason(2): error:2006D080:lib(32):func(109):reason(128)
2015-10-30T17:27:08+01:00 notice openvpn(lan)[27140]: Exiting due to fatal error
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: OpenVPN 2.3.6 powerpc-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Sep 14 2015
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: library versions: OpenSSL 1.0.2d 9 Jul 2015, LZO 2.08
2015-11-05T19:02:49+01:00 warning openvpn(lan)[24618]: 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
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: Diffie-Hellman initialized with 2048 bit key
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: Socket Buffers: R=[87380->131072] S=[16384->131072]
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: TUN/TAP device tap0 opened
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: TUN/TAP TX queue length set to 100
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: Listening for incoming TCP connection on [undef]
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: TCPv4_SERVER link local (bound): [undef]
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: TCPv4_SERVER link remote: [undef]
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: MULTI: multi_init called, r=256 v=256
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: IFCONFIG POOL: base=10.0.0.10 size=41, ipv6=0
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: MULTI: TCP INIT maxclients=1024 maxevents=1028
2015-11-05T19:02:49+01:00 notice openvpn(lan)[24618]: Initialization Sequence Completed
Powered by mwForum 2.29.3 © 1999-2013 Markus Wichitill