Error: Your Requested widget " adcontrol_sidebar_widget-4" is not in the widget list.
- [do_widget_area footer-a]
- [do_widget_area footer-b]
- [do_widget_area footer-c]
- [do_widget id="meta-4"]
- [do_widget_area sidebar]
- [do_widget id="recent-posts-2"]
- [do_widget id="twitter-follow-5"]
- [do_widget id="blog_subscription-3"]
- [do_widget id="archives-2"]
- [do_widget id="adcontrol_sidebar_widget-3"]
- [do_widget_area widgets_for_shortcodes]
- [do_widget id="adcontrol_sidebar_widget-4"]
- [do_widget_area wp_inactive_widgets]
- [do_widget id="meta-2"]
- [do_widget id="search-2"]
- [do_widget id="categories-2"]
- [do_widget id="recent-comments-2"]
- [do_widget id="rss-3"]
- [do_widget id="twitter-follow-3"]
- [do_widget id="twitter-timeline-profile-3"]
- [do_widget id="twitter-timeline-list-3"]
Image source: openvpn.net
Everbody knows OpenVPN. A powerful and easy to configure VPN client, which is cross-platform available for BSD, Linux, MAC and Windows.
A lot of my Linux boxes are OpenVPN clients, starting with Virtual Machines as well as physical boxes. If I use my OpenVPN server as a default gateway, some machines having trouble to create the necessarily route. The output in the most cases is something like this:
Sun Jun 19 14:03:20 2016 /bin/ip route add 188.8.131.52/32 via 0.0.0.0 RTNETLINK answers: No such device Sun Jun 19 14:03:20 2016 ERROR: Linux route add command failed: external program exited with error status: 2
So this means that the OpenVPN tried to create a new route with the help of the ip command which failed (error code 2). But how to fix this?
Add the route by your own
I’ve searched around the internet and nobody really had an answer to this. Well, the solution is rather simple. Directly after the successful connection to your OpenVPN server, add the route by your own. The following example would do this for the shown error above:
sudo route add -host 184.108.40.206 dev enp4s0
As you can see, there is no gateway address to reach the host. It’s simply the Ethernet device which is stated here (enp4s0 is the name of the first wired Ethernet device under openSUSE when using Network Manager (formerly known as eth0)).
This error also occurs, if you want to use a OpenVZ container as a OpenVPN client. By default, the first virtual network device of a OpenVZ container is called venet0. So you would have to enter the following command to get this error fixed:
sudo route add -host 220.127.116.11 dev venet0
After you added the host to your routing table with the correct outgoing network device, you’re ready to go to use the VPN as your default gateway.
To be honest, until now I wasn’t able to find a permanent fix for this. So this also means that you have to redo the route add command every time, when you have connected to your VPN.
If you know a permanent fix for this problem, just let me know in the comments below. Your help is appreciated 🙂