Feliz ano novo e tals,
Eu já havia instalado o openvpn usando este maravilhoso guia, infelizmente na virada do ano o hd da matriz morreu. Levantei um novo servidor na matriz, criei uma nova chave com chmod 777, copiei para a filial e levantei a tun0 na matriz, só que um não pinga o outro(10.0.0.1 para 10.0.0.2 e vice-versa).
TUN0 MATRIZ
Fri Jan 02 | Antares | 16:57:28
*root* ~:ifconfig tun0
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:205 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:17220 (17.2 KB)
TUN0 FILIAL
[email protected]:/home/alexagah# ifconfig tun0
tun0 Link encap:Não Especificado Endereço de HW 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet end.: 10.0.0.2 P-a-P:10.0.0.1 Masc:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Métrica:1
pacotes RX:0 erros:0 descartados:0 excesso:0 quadro:0
Pacotes TX:46 erros:0 descartados:0 excesso:0 portadora:0
colisões:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:3864 (3.8 KB)
Quando executo o comando "# openvpn --config /etc/openvpn/Matriz.conf -daemon &" da a seguinte mensagem
Fri Jan 2 16:47:05 2015 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Fri Jan 2 16:47:05 2015 WARNING: you are using user/group/chroot/setcon without persist-tun -- this may cause restarts to fail
Fri Jan 2 16:47:05 2015 WARNING: you are using user/group/chroot/setcon without persist-key -- this may cause restarts to fail
Fri Jan 2 16:47:05 2015 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Jan 2 16:47:05 2015 WARNING: file 'chave' is group or others accessible
Fri Jan 2 16:47:05 2015 Static Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Jan 2 16:47:05 2015 Static Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Jan 2 16:47:05 2015 Static Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Jan 2 16:47:05 2015 Static Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Jan 2 16:47:05 2015 LZO compression initialized
Fri Jan 2 16:47:05 2015 Socket Buffers: R=[212992->131072] S=[212992->131072]
Fri Jan 2 16:47:05 2015 TCP/UDP: Socket bind failed on local address [undef]: Address already in use
Fri Jan 2 16:47:05 2015 Exiting
A penultima linha fala que o endereço já está em uso. A titulo de teste, eu executei o mesmo comando na Filial e deu a mesma mensagem. Tem algo a ver ou tenho que refazer algo de diferente na matriz para que ela volte a se conectar com a filial?
OBS.: Editei o filial.conf para o novo ip externo da matriz.