asparion
(usa Ubuntu)
Enviado em 05/03/2014 - 15:43h
Olha pra ficar facil pra mim eu instalei o modulo openvpn no webmin. e consegui deu certo. todas estao pingando. so que nao esta pegando o ip conforme coloquei no arquivo. segue:
servidor
port 1194
proto udp
dev tun0
ca keys/servidor/ca.crt
cert keys/servidor/servidor.crt
key keys/servidor/servidor.key
dh keys/servidor/dh1024.pem
server 10.0.0.0 255.255.255.0
crl-verify keys/servidor/crl.pem
cipher DES-CBC
user nobody
group adm
status servers/matriz/logs/openvpn-status.log
log-append servers/matriz/logs/openvpn.log
verb 2
mute 20
max-clients 100
keepalive 10 120
client-config-dir /etc/openvpn/servers/matriz/ccd
comp-lzo
persist-key
persist-tun
ccd-exclusive
ifconfig 10.0.0.1 255.255.255.0
ifconfig
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.0.1 P-t-P:10.0.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:648 errors:0 dropped:0 overruns:0 frame:0
TX packets:707 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:54432 (53.1 KiB) TX bytes:59388 (57.9 KiB)
ou seja no servidor esta ok pegou 10.0.0.1 ate aqui ok.
agora na filial1
client
proto udp
dev tun
ca ca.crt
dh dh1024.pem
cert client1.crt
key client1.key
remote asparion.no-ip.info 1194
cipher DES-CBC
user nobody
group adm
verb 2
mute 20
keepalive 10 120
comp-lzo
persist-key
persist-tun
float
resolv-retry infinite
nobind
ifconfig 10.0.0.2 255.255.255.0
ifconfig
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.0.6 P-t-P:10.0.0.5 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:325 errors:0 dropped:0 overruns:0 frame:0
TX packets:427 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:27300 (26.6 KiB) TX bytes:35868 (35.0 KiB)
# viu aqui pegou 10.0.0.6 sendo que no arquivo e pra ser 10.0.0.2
filial2
client
proto udp
dev tun
ca ca.crt
dh dh1024.pem
cert client2.crt
key client2.key
remote asparion.no-ip.info 1194
cipher DES-CBC
user nobody
group adm
verb 2
mute 20
keepalive 10 120
comp-lzo
persist-key
persist-tun
float
resolv-retry infinite
nobind
ifconfig 10.0.0.3 255.255.255.0
ifconfig
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.0.10 P-t-P:10.0.0.9 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:344 errors:0 dropped:0 overruns:0 frame:0
TX packets:464 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:28896 (28.2 KiB) TX bytes:38976 (38.0 KiB)
# aqui era pra pegar ip 10.0.0.3 e esta com o ip 10.0.0.10
porem se ping do servidor 10.0.0.10 e 10.0.0.6 pinga normal
e nas filiais se ping 10.0.0.1 tambem pinga normal. so que ficando assim nao da pra adicionar as rotas no servidor.
segue:
[root@asparion openvpn]# route add -net 192.168.1.0/24 gw 10.0.0.6
SIOCADDRT: No such process
mas pelo menos ja deu certo todas estao pingando