# Device is always inactive? vpn problem?

**URL:** <https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878>\
**Category:** Product support\
**Created:** [May 21, 2020, 4:30am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878 "2020-05-21T04:30:50Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![janetao](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@janetao](https://forums.balena.io/u/janetao)\
**Post date:** [May 21, 2020, 4:30am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/1 "2020-05-21T04:30:51Z")

</div>

how can i check whether the device can reach the Balena servers ?  
When i re-flash my device, i ssh into it, i can’t login to the balena.And my logs stuck in as showed in the pic below.

 ![image](https://global.discourse-cdn.com/balena/original/2X/c/cf91367202e6d35bb8750619ff35979e0a62bb1c.png)  
 ![image](https://global.discourse-cdn.com/balena/original/2X/6/6735fe6841a7204835d0196b966d1c9bbfb562af.jpeg)

According to this page:  
[[https://www.balena.io/docs/learn/more/masterclasses/device-debugging/#6-determining-networking-issues](https://www.balena.io/docs/learn/more/masterclasses/device-debugging/#6-determining-networking-issues) ],  
here is my test result. Could someone help me?

 ![image](https://global.discourse-cdn.com/balena/original/2X/3/38dcdf24cdbb730da4038e82258e5935768c9009.png)  
 ![image](https://global.discourse-cdn.com/balena/original/2X/5/555adc2a3c1122060be153dbe46f93d31403b5bd.png)

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [May 21, 2020, 7:42am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/3 "2020-05-21T07:42:04Z")

</div>

Hi, when you are doing `balena login` inside a device - you are logging into docker registry, because `balena` is `balena-engine` there, not `balena-cli`. You can check if dns is working by pinging external services, like:

```auto
curl https://google.com
curl https://api.balena-cloud.com/ping

```

---

<div class="post-metadata">

**Author:** ![janetao](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@janetao](https://forums.balena.io/u/janetao)\
**Post date:** [May 21, 2020, 7:44am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/4 "2020-05-21T07:44:14Z")

</div>

![image](https://global.discourse-cdn.com/balena/original/2X/1/17825b022675d488b04caf7d7f3d3164758f96e2.png)

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [May 21, 2020, 7:50am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/6 "2020-05-21T07:50:07Z")

</div>

Also can you check VPN?

```auto
nmap -p 443 vpn.balena-cloud.com

```

---

<div class="post-metadata">

**Author:** ![janetao](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@janetao](https://forums.balena.io/u/janetao)\
**Post date:** [May 21, 2020, 7:51am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/7 "2020-05-21T07:51:17Z")

</div>

nmap: command not found

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [May 21, 2020, 7:54am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/8 "2020-05-21T07:54:44Z")

</div>

You should run it on the computer connected to the same network as the device (sorry for not telling this before)

---

<div class="post-metadata">

**Author:** ![janetao](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@janetao](https://forums.balena.io/u/janetao)\
**Post date:** [May 21, 2020, 8:31am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/10 "2020-05-21T08:31:52Z")

</div>

![image](https://global.discourse-cdn.com/balena/original/2X/3/3026ef29eb5a2e766d7373d3c4ebb59d5145a749.png)

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [May 21, 2020, 8:47am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/14 "2020-05-21T08:47:19Z")

</div>

Can you capture the full logs of the VPN and send us as text file? It’s hard to see from the screenshot.  
Also, why did you re-flash the device? Was VPN working before you re-flashed?

---

<div class="post-metadata">

**Author:** ![janetao](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@janetao](https://forums.balena.io/u/janetao)\
**Post date:** [May 21, 2020, 8:59am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/15 "2020-05-21T08:59:35Z")

</div>

that’s all the logs…How could i capture the full logs of the VPN ?  
Because i re-flash it to develpment mode for ssh login. VPN is not working before i re-flashed

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [May 21, 2020, 9:23am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/19 "2020-05-21T09:23:17Z")

</div>

You can get full logs using `journalctl -u openvpn --no-pager`. What kind of network is the device on? if it is a corporate network, it might be that a man in the middle proxy that is disrupting the VPN traffic.

---

<div class="post-metadata">

**Author:** ![janetao](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@janetao](https://forums.balena.io/u/janetao)\
**Post date:** [May 21, 2020, 9:37am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/20 "2020-05-21T09:37:53Z")

</div>

Below are logs for `journalctl -u openvpn --no-pager`  
[https://pastebin.com/QFH7piLK](https://pastebin.com/QFH7piLK)  
Yes, it is a corporate network.

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [May 21, 2020, 10:07am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/23 "2020-05-21T10:07:23Z")

</div>

We think vpn connection is blocked by firewall. Can you customize your firewall or try connecting the device to other network?

---

<div class="post-metadata">

**Author:** ![janetao](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@janetao](https://forums.balena.io/u/janetao)\
**Post date:** [May 21, 2020, 10:40am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/25 "2020-05-21T10:40:42Z")

</div>

how can i try connecting the device to other network?  
i have connecting the device within vpn, but the device can’t open vpn

---

<div class="post-metadata">

**Author:** ![karaxuna](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@karaxuna](https://forums.balena.io/u/karaxuna)\
**Post date:** [May 21, 2020, 11:08am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/26 "2020-05-21T11:08:52Z")

</div>

I mean connect your device to other network that is not your corporate network and see if it works. Or contact your network admins to allow balena VPN traffic to pass through the firewall.

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [May 21, 2020, 11:26am UTC](https://forums.balena.io/t/device-is-always-inactive-vpn-problem/117878/27 "2020-05-21T11:26:37Z")

</div>

Hi @janetao,  
Since you already have SSH access to the device, you can connect to balenaOS (the hostOS) and use the Network Manager cli to choose a different WiFi for the device to connect to  
For example you could set up a WiFi hotspot on a mobile phone, so that we can rule out whether the issue is related to the corporate network configuration.  
Let me point you to our documentation page about this:  
[https://www.balena.io/docs/learn/more/masterclasses/host-os-masterclass/#51-connect-to-a-wifi-ssid-whilst-running-balenaos](https://www.balena.io/docs/learn/more/masterclasses/host-os-masterclass/#51-connect-to-a-wifi-ssid-whilst-running-balenaos)

Please double check that the settings that you will be providing.  
After you issue that command your SSH connection will drop and you will have to connect again using the new network that the device will be using.

Kind regards,  
Thodoris
