Eu tenho a seguinte rede VPN, e o problema é, como acessar o raspberry pi ou qualquer OpenWRT Router VPN CLIENT com o endereço IP 192.168.8.X.
Eu posso acessar o OpenWRT VPN CLIENT com 10.8.0.6 do meu laptop, mas nenhuma resposta para o ping 192.168.8.1.
Além disso, posso acessar o IP 192.168.1.1 do meu laptop.
####################
# my laptop #
# VPN IP 10.8.0.10 #
####################
|
|
| internet
|
|
#########################
# OpenWRT VPN SERVER #
# VPN IP 10.8.0.1 #
# Router ip 192.168.1.1 #
#########################
|
|
| internet
|
|
######################### ####################
# OpenWRT VPN CLIENT #-----># Raspberry Pi #
# VPN IP 10.8.0.6 # # #
# Router ip 192.168.8.1 # # IP 192.168.8.123 #
######################### ####################
E para o arquivo de configuração do servidor VPN, eu tenho:
config openvpn 'myvpn'
option enabled '1'
option verb '3'
option proto 'udp'
option dev 'tun'
option dev 'tun0'
option topology subnet
option pull
option server '10.8.0.0 255.255.255.0'
option keepalive '10 120'
option ca '/etc/openvpn/ca.crt'
option cert '/etc/openvpn/my-server.crt'
option key '/etc/openvpn/my-server.key'
option dh '/etc/openvpn/dh2048.pem'
option port 'XXXX'
option client_to_client '1'
option down '/usr/bin/ovpn-down'
list push 'route 192.168.1.0 255.255.255.0'
list push 'route 192.168.10.0 255.255.255.0'
list push 'route 192.168.8.0 255.255.255.0'
list push 'dhcp-option DNS 192.168.10.1'
list push 'dhcp-option DNS 192.168.8.1'
list push 'route 10.8.0.1 255.255.255.255'
list push 'route 10.8.0.0 255.255.255.0'
list push 'redirect-gateway def1'
Adicionando novas informações:
Rotas do servidor:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 pppoe-wan
10.0.0.1 * 255.255.255.255 UH 0 0 0 pppoe-wan
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 0 0 0 br-lan
Também adicionou uma nova rota no servidor:
192.168.8.0 10.8.0.1 255.255.255.0 UG 0 0 0 tun0
Arquivo de configuração do cliente:
dev tun
proto udp
route 192.168.8.0/24
log openvpn.log
verb 3
client
remote-cert-tls server
remote dns.server.com XXXX
Tabela de rotas do cliente:
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
default 192.168.100.1 0.0.0.0 UG 10 0 0 eth0
10.8.0.0 * 255.255.255.0 U 0 0 0 tun0
10.8.0.1 10.8.0.1 255.255.255.255 UGH 0 0 0 tun0
128.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
xx.xx.xx.xx 192.168.100.1 255.255.255.255 UGH 0 0 0 eth0
192.168.1.0 10.8.0.1 255.255.255.0 UG 0 0 0 tun0
192.168.8.0 * 255.255.255.0 U 0 0 0 br-lan
192.168.10.0 10.8.0.1 255.255.255.0 UG 0 0 0 tun0
192.168.100.0 * 255.255.255.0 U 10 0 0 eth0
Além disso, eu tentei sem a opção list push 'route 192.168.8.0 255.255.255.0'
e ainda não consigo acessar o ip da rede 192.168.8.1.
Alguma idéia?
Tags networking vpn router openwrt