Temat: Openvpn dostep do LAN
Witam wszystkich,
Jestem nowy na forum wiec proszę o wyrozumiałość.
Sprzet :
NETGEAR R7800 + OpenWrt 19.07 KONG
Openvpn dziala lacze sie ze smartphona:
un Aug 30 17:41:37 2020 31.0.81.72:6142 [kubac] Peer Connection Initiated with [AF_INET]31.0.81.72:6142
Sun Aug 30 17:41:37 2020 MULTI: new connection by client 'kubac' will cause previous active sessions by this client to be dropped. Remember to use the --duplicate-cn option if you want multiple clients using the same certificate or username to concurrently connect.
Sun Aug 30 17:41:37 2020 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
Sun Aug 30 17:41:37 2020 MULTI: Learn: 10.8.0.6 -> kubac/31.0.81.72:6142
Sun Aug 30 17:41:37 2020 MULTI: primary virtual IP for kubac/31.0.81.72:6142: 10.8.0.6
Sun Aug 30 17:41:37 2020 kubac/31.0.81.72:6142 PUSH: Received control message: 'PUSH_REQUEST'
Sun Aug 30 17:41:37 2020 kubac/31.0.81.72:6142 SENT CONTROL [kubac]: 'PUSH_REPLY,route 192.168.1.0 255.255.255.0,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 1,cipher AES-256-GCM' (status=1)
Sun Aug 30 17:41:37 2020 kubac/31.0.81.72:6142 Data Channel: using negotiated cipher 'AES-256-GCM'
Sun Aug 30 17:41:37 2020 kubac/31.0.81.72:6142 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Aug 30 17:41:37 2020 kubac/31.0.81.72:6142 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Niestety nie moge sie polaczyc z zadnym urzadzeniem w LAN:
root@OpenWrt:/tmp/etc# cat /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 'fd38:01f7:f72c::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth1.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option ifname 'eth0.2'
option proto 'pppoe'
option password 'xxxxxxxxxxx'
option ipv6 'auto'
option username 'xxxxxxxxxx'
config interface 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 0t'
config interface 'vpn'
option ifname 'tun0'
option proto 'none'
config zone
option name 'vpn'
option input 'ACCEPT'
option forward 'ACCEPT'
option output 'ACCEPT'
option network 'vpn'
option masq '1'
config forwarding
option src 'vpn'
option dest 'wan'
config rule
option name 'OpenVPN'
option target 'ACCEPT'
option src 'wan'
option proto 'udp'
option dest_port '1194'
config forwarding
option src 'vpn'
option dest 'lan'
---------------------------------------------------
root@OpenWrt:/tmp/etc# cat /var/etc/openvpn-sample_server.conf
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/kuba.crt
compress lzo
dev tun0
dh /etc/openvpn/dh.pem
ifconfig-pool-persist /tmp/ipp.txt
keepalive 10 120
key /etc/openvpn/kuba.key
log /var/log/openvpn.log
port 1194
push "route 192.168.1.0 255.255.255.0"
server 10.8.0.0 255.255.255.0
status /tmp/openvpn-status.log
user nobody
verb 3
Prosze o pomoc