Hi,
We have setup our workflow for our builds, but we have some issues with the VPN.
We followed the documentation written here
Sometime it all goes well and that’s awesome, but sometime the VPN connection doesn’t work.
Here is the logs we have when it fails:
- temp_dir=/tmp/vpn-config
- mkdir /tmp/vpn-config
- cat
- sleep 3
- sudo openfortivpn -c /tmp/vpn-config/m6w-ghe.conf --pppd-no-peerdns
INFO: Connected to gateway.
INFO: Authenticated.
INFO: Remote gateway has allocated a VPN.
++ ps aux
++ grep ‘sudo openfortivpn’
++ grep root
++ awk ‘{print $2}’- sudo kill 1988
INFO: Cancelling threads…- sleep 2
INFO: Terminated pppd.
INFO: Closed connection to gateway.
ERROR: connect: Network is unreachable
INFO: Could not log out.- sleep 5
- sudo openfortivpn -c /tmp/vpn-config/m6w-ghe.conf --pppd-no-peerdns
INFO: Connected to gateway.
INFO: Authenticated.
INFO: Remote gateway has allocated a VPN.
INFO: Cancelling threads…
INFO: Terminated pppd.
INFO: Closed connection to gateway.
INFO: Logged out.- case “$OSTYPE” in
- echo ‘Disabling IPv6 and forcing DNS settings’
For comparison, here is the log when it all goes fine:
- temp_dir=/tmp/vpn-config
- mkdir /tmp/vpn-config
- cat
- sleep 3
- sudo openfortivpn -c /tmp/vpn-config/m6w-ghe.conf --pppd-no-peerdns
INFO: Connected to gateway.
INFO: Authenticated.
INFO: Remote gateway has allocated a VPN.
++ ps aux
++ grep ‘sudo openfortivpn’
++ grep root
++ awk ‘{print $2}’- sudo kill 1985
INFO: Cancelling threads…- sleep 2
INFO: Terminated pppd.
INFO: Closed connection to gateway.
ERROR: connect: Network is unreachable
INFO: Could not log out.- sleep 5
- sudo openfortivpn -c /tmp/vpn-config/m6w-ghe.conf --pppd-no-peerdns
INFO: Connected to gateway.
INFO: Authenticated.
INFO: Remote gateway has allocated a VPN.
INFO: Got addresses: [10.93.19.1], ns [0.0.0.0, 0.0.0.0]
INFO: Interface ppp0 is UP.
INFO: Setting new routes…
add net 141.138.91.186: gateway 10.100.0.1
add net 141.138.91.177: gateway 10.93.19.1
INFO: Adding VPN nameservers…
INFO: Tunnel is up and running.- case “$OSTYPE” in
- echo ‘Disabling IPv6 and forcing DNS settings’
We currently have no idea as to why sometimes it works and sometimes not, any advice on how to debug would be useful.
I have to look at how to remote access the VM yet, but if anyone as an idea, I’m all ears