OpenWRT - openVPN, kein Routing im bridged (Tap) Modus

ika2k

Lieutenant
Registriert
Juni 2010
Beiträge
690
Hallo zusammen,

ich habe vor, mein Neztwerk quasi virtuell zu erweitern und bin auch schon recht weit.
Ich habe dafür 2 kleine Router(chen) mit OpenWRT gekauft.

Server: GL.iNet MT300A
WAN IP: 192.168.9.2 statisch <-- Hier verbindung zum Router 192.168.9.1
LAN IP: 192.168.8.1, DHCP an (Standardeinstellung, da bin ich flexibel, da dieses Netz nicht genutzt werden wird, derzeit aber hilfreich wenn der WAN Adapter beim probieren zerschossen ist)

Client: GL.iNet AR300M
WAN IP: Flexibel/ DHCP Client
LAN IP: 192.168.9.212 DHCP an

Mein Heimnetzwerk ist 192.168.9.0/24

openVPN Config Server
Code:
local 192.168.9.2
port 1195
proto tcp
dev tap
ca /etc/openvpn/ca.crt
cert /etc/openvpn/Server.crt
key /etc/openvpn/Server.key
dh /etc/openvpn/dh4096.pem
ifconfig-pool-persist ipp.txt
server-bridge 192.168.9.1 255.255.255.0 192.168.9.212 192.168.9.230
server-bridge
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client-to-client
duplicate-cn
keepalive 10 60
cipher AES-256-CBC
persist-key
persist-tun
status /etc/openvpn/logopenvpn-status.log
log /etc/openvpn/openvpn.log
verb 5
Server log (anonymisiert)
Code:
XX:47:03 2017 us=340800 OpenVPN 2.4.3 mipsel-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
XX:47:03 2017 us=345860 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
XX:47:03 2017 us=359340 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
XX:47:03 2017 us=364880 WARNING: --ifconfig-pool-persist will not work with --duplicate-cn
XX:47:03 2017 us=818380 Diffie-Hellman initialized with 4096 bit key
XX:47:03 2017 us=878480 TLS-Auth MTU parms [ L:1655 D:1210 EF:40 EB:0 ET:0 EL:3 ]
XX:47:03 2017 us=890740 TUN/TAP device tap0 opened
XX:47:03 2017 us=895280 TUN/TAP TX queue length set to 100
XX:47:03 2017 us=929180 Data Channel MTU parms [ L:1655 D:1450 EF:123 EB:411 ET:32 EL:3 ]
XX:47:03 2017 us=933900 Could not determine IPv4/IPv6 protocol. Using AF_INET
XX:47:03 2017 us=938980 Socket Buffers: R=[87380->87380] S=[16384->16384]
XX:47:03 2017 us=943740 Listening for incoming TCP connection on [AF_INET]192.168.9.2:1195
XX:47:03 2017 us=968420 TCPv4_SERVER link local (bound): [AF_INET]192.168.9.2:1195
XX:47:03 2017 us=973140 TCPv4_SERVER link remote: [AF_UNSPEC]
XX:47:03 2017 us=977840 MULTI: multi_init called, r=256 v=256
XX:47:03 2017 us=999100 IFCONFIG POOL: base=192.168.9.212 size=19, ipv6=0
XX:47:04 2017 us=3920 IFCONFIG POOL LIST
XX:47:04 2017 us=8680 MULTI: TCP INIT maxclients=1024 maxevents=1028
XX:47:04 2017 us=13620 Initialization Sequence Completed
XX:47:06 2017 us=268540 TCP/UDP: Closing socket
XX:47:06 2017 us=273380 Closing TUN/TAP interface
XX:47:06 2017 us=291200 SIGHUP[hard,] received, process restarting
XX:47:06 2017 us=296860 OpenVPN 2.4.3 mipsel-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
XX:47:06 2017 us=320700 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
XX:47:06 2017 us=325660 Restart pause, 2 second(s)
XX:47:08 2017 us=350580 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
XX:47:08 2017 us=355880 WARNING: --ifconfig-pool-persist will not work with --duplicate-cn
XX:47:08 2017 us=370880 Diffie-Hellman initialized with 4096 bit key
XX:47:08 2017 us=390760 TLS-Auth MTU parms [ L:1655 D:1210 EF:40 EB:0 ET:0 EL:3 ]
XX:47:08 2017 us=399740 TUN/TAP device tap0 opened
XX:47:08 2017 us=404280 TUN/TAP TX queue length set to 100
XX:47:08 2017 us=437940 Data Channel MTU parms [ L:1655 D:1450 EF:123 EB:411 ET:32 EL:3 ]
XX:47:08 2017 us=459020 Could not determine IPv4/IPv6 protocol. Using AF_INET
XX:47:08 2017 us=463800 Socket Buffers: R=[87380->87380] S=[16384->16384]
XX:47:08 2017 us=468480 Listening for incoming TCP connection on [AF_INET]192.168.9.2:1195
XX:47:08 2017 us=473260 TCPv4_SERVER link local (bound): [AF_INET]192.168.9.2:1195
XX:47:08 2017 us=478020 TCPv4_SERVER link remote: [AF_UNSPEC]
XX:47:08 2017 us=506920 MULTI: multi_init called, r=256 v=256
XX:47:08 2017 us=523980 IFCONFIG POOL: base=192.168.9.212 size=19, ipv6=0
XX:47:08 2017 us=528680 IFCONFIG POOL LIST
XX:47:08 2017 us=533240 MULTI: TCP INIT maxclients=1024 maxevents=1028
XX:47:08 2017 us=538020 Initialization Sequence Completed
XX:58:05 2017 us=574073 MULTI: multi_create_instance called
XX:58:05 2017 us=578832 Re-using SSL/TLS context
XX:58:05 2017 us=584432 Control Channel MTU parms [ L:1655 D:1210 EF:40 EB:0 ET:0 EL:3 ]
XX:58:05 2017 us=589531 Data Channel MTU parms [ L:1655 D:1450 EF:123 EB:411 ET:32 EL:3 ]
XX:58:05 2017 us=693902 Local Options String (VER=V4): 'V4,dev-type tap,link-mtu 1591,tun-mtu 1532,proto TCPv4_SERVER,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-server'
XX:58:05 2017 us=750197 Expected Remote Options String (VER=V4): 'V4,dev-type tap,link-mtu 1591,tun-mtu 1532,proto TCPv4_CLIENT,cipher AES-256-CBC,auth SHA1,keysize 256,key-method 2,tls-client'
XX:58:05 2017 us=780074 TCP connection established with [AF_INET]80.147.XXX.XXX:48387
XX:58:05 2017 us=793053 TCP_SERVER link local: (not bound)
XX:58:05 2017 us=797712 TCP_SERVER link remote: [AF_INET]80.147.XXX.XXX:48387
RXX:58:06 2017 us=519907 80.147.XXX.XXX:48387 TLS: Initial packet from [AF_INET]80.147.XXX.XXX:48387, sid=dc8d94f3 e18e7387
WRRWWWWRRRRWRWRWRXX:58:10 2017 us=762687 80.147.XXX.XXX:48387 VERIFY OK: depth=1, C=DE, ST=Bavaria, L=Sonstwo, O=OpenVPN, OU=IT, CN=ServerHost, name=ServerName, emailAddress=me@you.domain
XX:58:10 2017 us=785665 80.147.XXX.XXX:48387 VERIFY OK: depth=0, C=DE, ST=Bavaria, L=Sonstwo, O=OpenVPN, OU=IT, CN=Client, name=Server, emailAddress=me@you.domain
WRXX:58:10 2017 us=899055 80.147.XXX.XXX:48387 peer info: IV_VER=2.4.3
XX:58:10 2017 us=903715 80.147.XXX.XXX:48387 peer info: IV_PLAT=linux
XX:58:10 2017 us=908314 80.147.XXX.XXX:48387 peer info: IV_PROTO=2
XX:58:10 2017 us=913014 80.147.XXX.XXX:48387 peer info: IV_NCP=2
XX:58:10 2017 us=917654 80.147.XXX.XXX:48387 peer info: IV_LZ4=1
XX:58:10 2017 us=922313 80.147.XXX.XXX:48387 peer info: IV_LZ4v2=1
XX:58:10 2017 us=926913 80.147.XXX.XXX:48387 peer info: IV_LZO=1
XX:58:10 2017 us=931472 80.147.XXX.XXX:48387 peer info: IV_COMP_STUB=1
XX:58:10 2017 us=936152 80.147.XXX.XXX:48387 peer info: IV_COMP_STUBv2=1
XX:58:10 2017 us=940792 80.147.XXX.XXX:48387 peer info: IV_TCPNL=1
WRXX:58:10 2017 us=988567 80.147.XXX.XXX:48387 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 4096 bit RSA
XX:58:10 2017 us=993807 80.147.XXX.XXX:48387 [Client] Peer Connection Initiated with [AF_INET]80.147.XXX.XXX:48387
XX:58:10 2017 us=998766 Client/80.147.XXX.XXX:48387 MULTI_sva: pool returned IPv4=192.168.9.212, IPv6=(Not enabled)
RXX:58:11 2017 us=997838 Client/80.147.XXX.XXX:48387 PUSH: Received control message: 'PUSH_REQUEST'
XX:58:12 2017 us=2998 Client/80.147.XXX.XXX:48387 SENT CONTROL [Client]: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route-gateway 192.168.9.1,ping 10,ping-restart 60,ifconfig 192.168.9.212$
XX:58:12 2017 us=8717 Client/80.147.XXX.XXX:48387 Data Channel: using negotiated cipher 'AES-256-GCM'
XX:58:12 2017 us=13557 Client/80.147.XXX.XXX:48387 Data Channel MTU parms [ L:1583 D:1450 EF:51 EB:411 ET:32 EL:3 ]
XX:58:12 2017 us=19676 Client/80.147.XXX.XXX:48387 Data Channel Encrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
XX:58:12 2017 us=24656 Client/80.147.XXX.XXX:48387 Data Channel Decrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
WWRRXX:58:12 2017 us=319070 Client/80.147.XXX.XXX:48387 MULTI: Learn: e4:95:6e:42:04:20 -> Client/80.147.XXX.XXX:48387
wRwRwRwRwWRwRwWWRwRwRwRwRwRwRwRwWRwWRwRwRwRwRwRwRwRwWWRwRwWRwRwRwRwWRRwRwRwWRwRwRwRwRwRwWRwRwRwWRwRwRwWRwRwRwRwRwRwWRRwRwRWed Sep 20 14:00:01 2017 us=357162 Client/80.147.XXX.XXX:48387 MULTI: Learn: e4:a7:a0:c5:09:ef -> Client/80.147.90.8$
wWRwRwRwRwRwRwRwRwRwRwRwRwWRwRwRwRwRwRwRwWRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwWRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRWed Sep 20 14:00:40 2017 us=111817 Client/80.147.XXX.XXX:48387 MULTI: Learn: 18:f6:43:29:30:1f -> Client/80.$
wRwRwRwWRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwWWRwRwWRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwWRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwWRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwWRwRwRwRwRwRwRwRwRwRwRwRwRwRwRwRw$
openVPN Config Client
Code:
client
dev tap
proto tcp
remote [Server IP] 1195
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server #evtl ein Problem?
cipher AES-256-CBC
verb 5
Client log (anonymisiert, bin mir nicht sicher ob ich alles erwischt habe, sollte aber nicht so wichtig sein wie das Server log)
Code:
XX:51:44 2017 daemon.err openvpn[1514]: event_wait : Interrupted system call (code=4)
XX:51:44 2017 daemon.notice openvpn[1514]: TCP/UDP: Closing socket
XX:51:44 2017 daemon.notice openvpn[1514]: /usr/sbin/ip route del 188.195.xxx.xxx/32
XX:51:44 2017 daemon.err openvpn[2131]: event_wait : Interrupted system call (code=4)
XX:51:44 2017 daemon.notice openvpn[2131]: TCP/UDP: Closing socket
XX:51:44 2017 daemon.notice openvpn[2131]: /usr/sbin/ip route del 188.195.xxx.xxx/32
XX:51:44 2017 daemon.notice openvpn[2131]: /usr/sbin/ip route del 0.0.0.0/1
XX:51:44 2017 daemon.notice openvpn[2131]: /usr/sbin/ip route del 128.0.0.0/1
XX:51:44 2017 daemon.notice openvpn[2131]: Closing TUN/TAP interface
XX:51:44 2017 daemon.notice openvpn[2131]: /usr/sbin/ip addr del dev tap0 192.168.9.212/24
XX:51:44 2017 daemon.warn openvpn[1514]: ERROR: Linux route  delete command failed: external program exited with error status: 1
XX:51:44 2017 daemon.notice openvpn[1514]: /usr/sbin/ip route del 0.0.0.0/1
XX:51:44 2017 daemon.warn openvpn[1514]: ERROR: Linux route  delete command failed: external program exited with error status: 1
XX:51:45 2017 daemon.notice openvpn[1514]: /usr/sbin/ip route del 128.0.0.0/1
XX:51:45 2017 daemon.warn openvpn[1514]: ERROR: Linux route  delete command failed: external program exited with error status: 1
XX:51:45 2017 daemon.notice openvpn[1514]: Closing TUN/TAP interface
XX:51:45 2017 daemon.notice openvpn[1514]: /usr/sbin/ip addr del dev tap1 192.168.9.213/24
XX:51:45 2017 daemon.notice netifd: Network device 'tap0' link is down
XX:51:45 2017 daemon.notice netifd: Interface 'vpn0' has link connectivity loss
XX:51:45 2017 daemon.notice netifd: Interface 'vpn0' is now down
XX:51:45 2017 kern.info kernel: [  285.340000] br-lan: port 3(tap0) entered disabled state
XX:51:45 2017 kern.info kernel: [  285.350000] device tap0 left promiscuous mode
XX:51:45 2017 kern.info kernel: [  285.350000] br-lan: port 3(tap0) entered disabled state
XX:51:45 2017 daemon.notice openvpn[2131]: SIGTERM[hard,] received, process exiting
XX:51:45 2017 daemon.notice netifd: Interface 'VPN_client' has link connectivity loss
XX:51:45 2017 daemon.notice netifd: Interface 'VPN_client' is now down
XX:51:45 2017 daemon.notice netifd: Interface 'vpn0' is disabled
XX:51:45 2017 daemon.notice netifd: Interface 'VPN_client' is disabled
XX:51:45 2017 daemon.notice openvpn[1514]: SIGTERM[hard,] received, process exiting
XX:56:28 2017 daemon.info dnsmasq-dhcp[2188]: DHCPINFORM(br-lan) 192.168.9.248 e4:a7:a0:c5:09:ef
XX:56:28 2017 daemon.info dnsmasq-dhcp[2188]: DHCPACK(br-lan) 192.168.9.248 e4:a7:a0:c5:09:ef DENBGNB16013
XX:57:52 2017 daemon.info hostapd: wlan0: STA e4:a7:a0:c5:09:ef WPA: group key handshake completed (RSN)
XX:57:53 2017 daemon.info hostapd: wlan0: STA 18:f6:43:29:30:1f WPA: group key handshake completed (RSN)
XX:58:00 2017 daemon.notice openvpn[6395]: OpenVPN 2.4.3  mips-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO]  [AEAD]
XX:58:00 2017 daemon.notice openvpn[6395]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
XX:58:00 2017 daemon.notice openvpn[6400]: Control Channel MTU parms [ L:1655 D:1210 EF:40 EB:0 ET:0 EL:3 ]
XX:58:00 2017 daemon.notice openvpn[6400]: Data Channel MTU parms [ L:1655 D:1450 EF:123 EB:411 ET:32 EL:3 ]
XX:58:00 2017 daemon.notice openvpn[6400]: Local Options  String (VER=V4): 'V4,dev-type tap,link-mtu 1591,tun-mtu 1532,proto  TCPv4_CLIENT,cipher AES-256-CBC,auth SHA1,keysize 256,key-method  2,tls-client'
XX:58:00 2017 daemon.notice openvpn[6400]: Expected Remote  Options String (VER=V4): 'V4,dev-type tap,link-mtu 1591,tun-mtu  1532,proto TCPv4_SERVER,cipher AES-256-CBC,auth SHA1,keysize  256,key-method 2,tls-server'
XX:58:00 2017 daemon.notice openvpn[6400]: TCP/UDP:  Preserving recently used remote address:  [AF_INET6]2002:bcc3:1939:XXX:ca0e:XXXf:feXX:e3XX:1195
XX:58:00 2017 daemon.notice openvpn[6400]: Socket Buffers: R=[87380->87380] S=[16384->16384]
XX:58:00 2017 daemon.notice openvpn[6400]: Attempting to  establish TCP connection with  [AF_INET6]2002:bcc3:1939:XXX:ca0e:XXXf:feXX:e3XX:1195 [nonblock]
XX:58:00 2017 daemon.err openvpn[6400]: TCP: connect to  [AF_INET6]2002:bcc3:1939:XXX:ca0e:XXXf:feXX:e3XX:1195 failed: Permission  denied
XX:58:00 2017 daemon.notice openvpn[6400]: SIGUSR1[connection  failed(soft),init_instance] received, process restarting
XX:58:00 2017 daemon.notice openvpn[6400]: Restart pause, 5 second(s)
XX:58:05 2017 daemon.notice openvpn[6400]: Re-using SSL/TLS context
XX:58:05 2017 daemon.notice openvpn[6400]: Control Channel MTU parms [ L:1655 D:1210 EF:40 EB:0 ET:0 EL:3 ]
XX:58:05 2017 daemon.notice openvpn[6400]: Data Channel MTU parms [ L:1655 D:1450 EF:123 EB:411 ET:32 EL:3 ]
XX:58:05 2017 daemon.notice openvpn[6400]: Local Options  String (VER=V4): 'V4,dev-type tap,link-mtu 1591,tun-mtu 1532,proto  TCPv4_CLIENT,cipher AES-256-CBC,auth SHA1,keysize 256,key-method  2,tls-client'
XX:58:05 2017 daemon.notice openvpn[6400]: Expected Remote  Options String (VER=V4): 'V4,dev-type tap,link-mtu 1591,tun-mtu  1532,proto TCPv4_SERVER,cipher AES-256-CBC,auth SHA1,keysize  256,key-method 2,tls-server'
XX:58:05 2017 daemon.notice openvpn[6400]: TCP/UDP:  Preserving recently used remote address: [AF_INET]188.195.xxx.xxx:1195
XX:58:05 2017 daemon.notice openvpn[6400]: Socket Buffers: R=[87380->87380] S=[16384->16384]
XX:58:05 2017 daemon.notice openvpn[6400]: Attempting to  establish TCP connection with [AF_INET]188.195.xxx.xxx:1195 [nonblock]
XX:58:06 2017 daemon.notice openvpn[6400]: TCP connection established with [AF_INET]188.195.xxx.xxx:1195
XX:58:06 2017 daemon.notice openvpn[6400]: TCP_CLIENT link local: (not bound)
XX:58:06 2017 daemon.notice openvpn[6400]: TCP_CLIENT link remote: [AF_INET]188.195.xxx.xxx:1195
XX:58:06 2017 daemon.notice openvpn[6400]: TLS: Initial  packet from [AF_INET]188.195.xxx.xxx:1195, sid=ff2e7d48 912f1b7f
XX:58:08 2017 daemon.notice openvpn[6400]: VERIFY OK:  depth=1, C=DE, ST=Bavaria, L=Sonstwo, O=OpenVPN, OU=IT, CN=ServerHost,  name=ServerName, emailAddress=me@you.domain
XX:58:08 2017 daemon.notice openvpn[6400]: VERIFY KU OK
XX:58:08 2017 daemon.notice openvpn[6400]: Validating certificate extended key usage
XX:58:08 2017 daemon.notice openvpn[6400]: ++ Certificate has  EKU (str) TLS Web Server Authentication, expects TLS Web Server  Authentication
XX:58:08 2017 daemon.notice openvpn[6400]: VERIFY EKU OK
XX:58:08 2017 daemon.notice openvpn[6400]: VERIFY OK:  depth=0, C=DE, ST=Bavaria, L=Sonstwo, O=OpenVPN, OU=IT, CN=ServerHost,  name=Server, emailAddress=me@you.domain
XX:58:10 2017 daemon.notice openvpn[6400]: Control Channel:  TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 4096 bit RSA
XX:58:10 2017 daemon.notice openvpn[6400]: [ServerHost] Peer Connection Initiated with [AF_INET]188.195.xxx.xxx:1195
XX:58:11 2017 daemon.notice openvpn[6400]: SENT CONTROL [ServerHost]: 'PUSH_REQUEST' (status=1)
XX:58:12 2017 daemon.notice openvpn[6400]: PUSH: Received  control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS  8.8.8.8,dhcp-option DNS 8.8.4.4,route-gateway 192.168.9.1,ping  10,ping-restart 60,ifconfig 192.168.9.212 255.255.255.0,peer-id 0,cipher  AES-256-GCM'
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: timers and/or timeouts modified
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: --ifconfig/up options modified
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: route options modified
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: route-related options modified
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: peer-id set
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: adjusting link_mtu to 1658
XX:58:12 2017 daemon.notice openvpn[6400]: OPTIONS IMPORT: data channel crypto options modified
XX:58:12 2017 daemon.notice openvpn[6400]: Data Channel: using negotiated cipher 'AES-256-GCM'
XX:58:12 2017 daemon.notice openvpn[6400]: Data Channel MTU parms [ L:1586 D:1450 EF:54 EB:411 ET:32 EL:3 ]
XX:58:12 2017 daemon.notice netifd: Interface 'vpn0' is enabled
XX:58:12 2017 daemon.notice netifd: Interface 'VPN_client' is enabled
XX:58:12 2017 kern.info kernel: [  672.450000] device tap0 entered promiscuous mode
XX:58:12 2017 kern.info kernel: [  672.450000] br-lan: port 3(tap0) entered forwarding state
XX:58:12 2017 kern.info kernel: [  672.460000] br-lan: port 3(tap0) entered forwarding state
XX:58:12 2017 daemon.notice openvpn[6400]: /usr/sbin/ip addr add dev tap0 192.168.9.212/24 broadcast 192.168.9.255
XX:58:12 2017 daemon.notice netifd: Network device 'tap0' link is up
XX:58:12 2017 daemon.notice netifd: Interface 'vpn0' has link connectivity
XX:58:12 2017 daemon.notice netifd: Interface 'vpn0' is setting up now
XX:58:12 2017 daemon.notice netifd: Interface 'vpn0' is now up
XX:58:12 2017 daemon.notice netifd: Interface 'VPN_client' has link connectivity
XX:58:12 2017 daemon.notice netifd: Interface 'VPN_client' is setting up now
XX:58:12 2017 daemon.notice netifd: Interface 'VPN_client' is now up
XX:58:12 2017 daemon.notice openvpn[6400]: /usr/sbin/ip route add 188.195.xxx.xxx/32 via 10.251.23.254
XX:58:12 2017 daemon.notice openvpn[6400]: /usr/sbin/ip route add 0.0.0.0/1 via 192.168.9.1
XX:58:12 2017 daemon.notice openvpn[6400]: /usr/sbin/ip route add 128.0.0.0/1 via 192.168.9.1
XX:58:12 2017 daemon.warn openvpn[6400]: WARNING: this  configuration may cache passwords in memory -- use the auth-nocache  option to prevent this
XX:58:12 2017 daemon.notice openvpn[6400]: Initialization Sequence Completed

Mit dieser Konfiguration kann ich, wenn ich den Client belasse und auf meinen openVPN Server, den ich auf Windows 10 eingerichtet habe (quasi identische Server Config, lediglich jeweils Port und local IP geändert) connecten und dadurch, dass ich das Windows TAP device mit meiner LAN Netzwerkkarte gebridged habe auch alls wie gewollt nutzen. D.h. Routing ins netz, DLNA kommt durch (das ist auch der Grund für Tap und nicht Tun), surfen im Internet über meinen Anschluss Zuhause.

Wenn ich aber alles (wie oben dargestellt) auf dem OpenWRT openVPN des Routers laufen lasse steht zwar der Tunnel, es fließen aber keine Daten.
Ich habe auch schon alle möglichen Dinge probiert, Firewall aus, Firewalregeln aus den diversen Howto`s, alle möglichen Netzwerkkarten gebridged, mit den IPs "gespielt" etc. aber es kommt einfach nichts durch den Tunnel.

Hier noch die Infos zur Firewall und zur IP Configuration des Servers (der Client funktioniert ja zumindest mit dem Windows Server, daher sollte das unproblematisch sein):

ifconfig
Code:
ifconfig
br-lan    Link encap:Ethernet  HWaddr E4:95:6E:40:F9:A4
          inet addr:192.168.8.1  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fd5e:2d67:6249::1%12896712/60 Scope:Global
          inet6 addr: fe80::e695:6eff:fe40:f9a4%12896712/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5250 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:2506806 (2.3 MiB)

eth0      Link encap:Ethernet  HWaddr E4:95:6E:40:F9:A4
          inet6 addr: fe80::e695:6eff:fe40:f9a4%12896104/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17279 errors:0 dropped:40 overruns:0 frame:0
          TX packets:8282 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3566634 (3.4 MiB)  TX bytes:2668459 (2.5 MiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr E4:95:6E:40:F9:A4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 B)  TX bytes:29250 (28.5 KiB)

eth0.2    Link encap:Ethernet  HWaddr E4:95:6E:40:F9:A5
          inet addr:192.168.9.2  Bcast:192.168.9.255  Mask:255.255.255.0
          inet6 addr: 2002:bcc3:1939:0:e695:6eff:fe40:f9a5%12897000/64 Scope:Global
          inet6 addr: fe80::e695:6eff:fe40:f9a5%12897000/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16947 errors:0 dropped:56 overruns:0 frame:0
          TX packets:7586 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3225327 (3.0 MiB)  TX bytes:2573454 (2.4 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%12895560/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:368 errors:0 dropped:0 overruns:0 frame:0
          TX packets:368 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:28412 (27.7 KiB)  TX bytes:28412 (27.7 KiB)

tap0      Link encap:Ethernet  HWaddr B6:B2:C7:71:54:EE
          inet6 addr: fe80::b4b2:c7ff:fe71:54ee%12894376/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:964 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:62281 (60.8 KiB)  TX bytes:3576 (3.4 KiB)
bzw. network
Code:
/etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd5e:2d67:6249::/48'

config interface 'lan'
        option ifname 'eth0.1'
        option force_link '1'
        option macaddr 'e4:95:6e:40:f9:a4'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option hostname 'GL-MT300A-9a4'
        option ipaddr '192.168.8.1'

config interface 'wan'
        option ifname 'eth0.2'
        option force_link '1'
        option macaddr 'e4:95:6e:40:f9:a5'
        option hostname 'GL-MT300A-9a4'
        option metric '10'
        option proto 'static'
        option ipaddr '192.168.9.2'
        option netmask '255.255.255.0'
        option gateway '192.168.9.1'
        option dns '192.168.9.1'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 6t'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 6t'

config interface 'VPN_client'
        option proto 'none'
        option ifname 'tap0'
und noch openWRT Screenshots der Interfaces
interf.png
interf_vpn.png


Weiß jemand was ich also an meiner Netzwerkkonfiguration ändern muss, um das endlich zum Laufen zu bringen? Irgendwie beim Server Tap und WWAN anders bridgen?

Viele Grüße und Dank
ika
 
Zuletzt bearbeitet:
Ja, hat nur leider mit dieser Problemstellung nur wenig zu tun. Habe beim alten Tread was dazu geschrieben, sorry wenn du dich persönlich beleidigt fühlst, war nicht meine Absicht.
Meine Absicht war, falsche Ansätze und Probleme ohne Lösung aus dem Forum rauszuhalten, damit Leute mit ähnlichen Problemen nicht erstmal die falsche Variante versuchen (wie ich es oft gemacht habe).

Hilfreich wäre (zumal ich geschrieben habe, dass es auch mit deaktivierter Firewall nicht klappt) wenn mir jemand helfen könnte, meine Interfaces sauber zu konfigurieren. Daran scheitert es meiner Meinung nach nämlich derzeit.

Habe schon versucht die Interfaces bis auf WAN und TAP zu löschen und die zu brücken, das hat auch bis zum Neustart mit vielen Packetlosses und ultralahm funktiert, ist damit also noch immer keine saubere Lösung.

Also habe ich meinem Fortschritt entsprechend der aktuellen Stand hier nochmal ausführlicher dargestellt und hoffe noch immer auf den ein oder anderen Hinweis.

Viele Grüße
ika
 
Also wenn ich das richtig verstehe funzt bei dir anscheinend alles bis auf die Verbindung von deinem OpenWRT zu deinem Windows VPN Server und damit eben auch die Verbindung in das interne Netz, welches durch den Tunnel geroutet werden soll.

Ich habe bei meinem PfSense die Erfahrung gemacht, dass ein redirect-gateway nicht greift.
(Was per default auch IMHO keinen Sinn macht)

Ich musste das Gateway meiner Kiste dann auf das Tunnel Interface ändern, damit dort Traffic durch geschoben wird.
Also quasi dein WAN dem Tunnel Interface zuzuweißen.

Mit "ip route show" kannst du nach dem Verbindungsaufbau ja mal schauen, was dein Default Gateway ist und wie andere routen gesetzt sind.

Ansonsten gibts hier Doku:
https://wiki.openwrt.org/doc/networking/routing

Vielleicht hilft das ja.


PS: Ich hatte mich nicht angegriffen Gefühlt, aber einen deiner Threads liegen zu lassen anstatt etwas zu ergänzen ist normalerweise nicht zielführend.
 
Danke, es verhält sich allerdings leicht anders:
Server Win10 und Client OpenWRT funktioniert komplett wie es soll
Server OpenWRT und Client OpenWRT funktioniert nur der Tunnel, es kommt aber kein Datenverkehr zustandeich habe hier mal kurz die Routeninforamtionen.

Also egal ob mit oder ohne aufgebauten Tunnel sieht die Routenkonfiguration beim "Server OpenWRT" folgendermaßen aus:
Code:
~# ip route show
default via 192.168.9.1 dev eth0.2  proto static  metric 10
192.168.8.0/24 dev br-lan  proto kernel  scope link  src 192.168.8.1
192.168.9.0/24 dev eth0.2  proto static  scope link  metric 10
was komplett falsch sein sollte weil da das "LAN" Interface 192.168.8.1 mit dem "WAN" Interface 192.168.9.2 gebrückt ist

Aber eigentlich müsste die Brücke das TAP Interface und das WAN Interface überbrücken oder?

Beim Client sieht das dann folgendermaßen aus:
Code:
~# ip route show
0.0.0.0/1 via 192.168.9.1 dev br-lan
default via 10.251.23.254 dev wlan-sta  proto static  src 10.251.16.107  metric 20
10.251.16.0/21 dev wlan-sta  proto static  scope link  metric 20
10.251.23.254 dev wlan-sta  proto static  scope link  src 10.251.16.107  metric 20
128.0.0.0/1 via 192.168.9.1 dev br-lan
188.195.XXX.XXX via 10.251.23.254 dev wlan-sta
192.168.9.0/24 dev br-lan  proto kernel  scope link  src 192.168.9.253
192.168.9.0/24 dev tap0  proto kernel  scope link  src 192.168.9.212



Den Rest schaue ich mir das heute Abend mal an.

Zur Erklärung vielleicht noch die Luci Screenshots der Interfaces bzw. der Brücke(n) Möglichkeiten bzw. Standardeinstellungen des Servers.
2017_09_22_13_44_04_Desktop.png
2017_09_22_13_44_37_Desktop.png
 
Zuletzt bearbeitet:
sorry, ich komme gerade nicht dazu bleibe aber dran ;)
(bin auch immernoch an Ideen interessiert)
 
Zurück
Oben