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.
opkg update
opkg install openvpn-easy-rsa
cd /etc/easy-rsa
export KEY_COUNTRY="US"
export KEY_PROVINCE="CA"
export KEY_CITY="SanFrancisco"
export KEY_ORG="Fort-Funston"
export KEY_EMAIL="me@myhost.mydomain"
clean-all
build-ca
build-dh
build-key-server server
build-key client
cd /etc/easy-rsa/keys
cp ca.crt ca.key dh1024.pem server.crt server.key /etc/openvpn/
config rule
option target 'ACCEPT'
option name 'VPN'
option src 'wan'
option dest_port '443'
option proto 'tcp
'config interface 'lan'
option ifname 'eth0 eth1 tap0'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.55.1'
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'
/etc/init.d/openvpn enable
/etc/init.d/firewall restart
client
tls-client
dev tap
proto tcp
remote IP-SER-VER-U 443 # zde vlozte jmeno nebo IP adresu Vašeho serveru
resolv-retry infinite
nobind
ca ca.crt
cert client.crt
key client.key
mute-replay-warnings
comp-lzo
verb 3
keepalive 10 120
persist-key
persist-tun
> Nemá někdo příklad s TUN rozhraním ?
/etc/config/openvpn:
config openvpn 'turris_server'
option enabled '1'
option port '1194'
option proto 'udp6'
option dev 'tunvpn'
option ca '/etc/easy-rsa/keys/ca.crt'
option cert '/etc/easy-rsa/keys/turris.crt'
option key '/etc/easy-rsa/keys/turris.key'
option dh '/etc/openvpn/dh2048.pem'
option topology 'subnet'
option server '192.168.179.0 255.255.255.0'
option server_ipv6 '2001:db8:dead:beef::1/64'
option ifconfig_pool_persist '/tmp/ipp.txt'
list push 'redirect-gateway def1'
list push 'route-ipv6 2000::/3'
option keepalive '10 120'
option persist_key '1'
option persist_tun '1'
option status '/tmp/openvpn-status.log'
option verb '3'
/etc/config/network:
config interface 'turrisvpn'
option ifname 'tunvpn'
option proto 'static'
option ipaddr '192.168.179.1'
option netmask '255.255.255.0'
option ip6assign '64'
option ip6hint 'beef'
/etc/config/firewall
přidat VPN rozhraní do zóny LAN a povolit příchozí provoz:
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option network 'lan turrisvpn'
config rule
option name 'OpenVPN'
option src 'wan'
option proto 'udp'
option dest_port '1194'
option target 'ACCEPT'
> Je nutno ještě pořešit routování z VPN <-> LAN nebo stačí zahrnutí vpn rozhraní do zóny lan ?
>
/etc/init.d/network reload
dev tun
proto udp
verb 3
ca ca.crt
cert client.crt
key client.key
client
remote IP-TURRISU 1194
nobind
auth-nocache
script-security 2
persist-key
persist-tun
user nobody
group nogroup
dhcp-option DNS 192.168.55.1
za dhcp-option DNS 192.168.100.1
.
option multihome '1'
brctl show br-lan
.
Thu Mar 10 10:48:15 2016 OpenVPN 2.3.10 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Feb 1 2016
Thu Mar 10 10:48:15 2016 Windows version 6.2 (Windows 8 or greater)
Thu Mar 10 10:48:15 2016 library versions: OpenSSL 1.0.1r 28 Jan 2016, LZO 2.09
Enter Management Password:
Thu Mar 10 10:48:15 2016 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Thu Mar 10 10:48:15 2016 Need hold release from management interface, waiting...
Thu Mar 10 10:48:15 2016 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Thu Mar 10 10:48:16 2016 MANAGEMENT: CMD 'state on'
Thu Mar 10 10:48:16 2016 MANAGEMENT: CMD 'log all on'
Thu Mar 10 10:48:16 2016 MANAGEMENT: CMD 'hold off'
Thu Mar 10 10:48:16 2016 MANAGEMENT: CMD 'hold release'
Thu Mar 10 10:48:16 2016 Socket Buffers: R=[65536->65536] S=[65536->65536]
Thu Mar 10 10:48:16 2016 Attempting to establish TCP connection with [AF_INET]MOJE IP:1194 [nonblock]
Thu Mar 10 10:48:16 2016 MANAGEMENT: >STATE:1457603296,TCP_CONNECT,,,
Thu Mar 10 10:48:26 2016 TCP: connect to [AF_INET]MOJE IP:1194 failed, will try again in 5 seconds: Systém se pokusil připojit jednotku k adresáři na připojené jednotce.
Powered by mwForum 2.29.3 © 1999-2013 Markus Wichitill