Portál AbcLinuxu, 4. května 2025 19:29
local 10.1.10.229 # 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/Pi.crt # SWAP WITH YOUR CRT NAME key /etc/openvpn/easy-rsa/keys/Pi.key # SWAP WITH YOUR KEY NAME dh /etc/openvpn/easy-rsa/keys/dh2048.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 10.1.10.229 255.255.255.255" # 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 8.8.8.8 " # 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 1Ako klienta pouzivam Windows 10 a OpenWRT. Priklad konfiguraku z windows:
client dev tun proto udp remote 10.1.10.229 1194 resolv-retry infinite nobind persist-key persist-tun mute-replay-warnings ns-cert-type server cipher AES-128-CBC comp-lzo verb 3 mute 20Problemom je, ze po pripojeni neviem pingnut server 10.8.0.1. V com by to mohlo byt? Este z logu:
Mon Sep 11 15:29:15 2017 PUSH: Received control message: 'PUSH_REPLY,route 10.8.0.1 255.255.255.255,route 10.8.0.0 255.255.255.0, route 10.1.10.229 255.255.255.255,dhcp-option DNS 8.8.8.8 ,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.14 10.8.0.13'
Řešení dotazu:
mode server dev tun port 1194 proto udp server 10.8.0.0 255.255.255.0 push "dhcp-option DNS 8.8.8.8" push "redirect=gateway def1" ca X cert X key X dh X tls-auth X auth X cipher X
push "dhcp-option DNS 8.8.8.8"DNS komunikaciu nasej bezpecnej siete jebneme celu do Googlu. FUJ!
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.