ifconfig and static key - error or warning

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
zinpin
OpenVpn Newbie
Posts: 4
Joined: Sat Sep 05, 2020 2:08 pm

ifconfig and static key - error or warning

Post by zinpin » Sat Sep 05, 2020 2:59 pm

I'm trying to set up a VPN using a static key. Very simple server config from: http://www.openmaniak.com/openvpn_tutorial.php#static and the official docs - https://openvpn.net/community-resources ... ini-howto/

Basically the Server Config is:

Server Config
dev tun
topology subnet
secret /etc/openvpn/keys/static.key
ifconfig 10.8.0.1 10.8.0.2
[...]


But the server won't start, it's giving this error:

Code: Select all

	Error: ??? prefix is expected rather than "10.8.0.1/-1".
No idea what that means and googling didn't help, I'll just comment it out. And it works! Except now the client side is warning:

Code: Select all

	Sat Sep 05 15:48:24 2020 WARNING: 'ifconfig' is present in local config but missing in remote config, local='ifconfig 10.8.0.2 10.8.0.1'
Client has:
Server Config

ifconfig 10.8.0.2 10.8.0.1


But if I comment out that line on the client, the client fails at parsing the config.

Any thoughts what's going on? Do I just leave the line in the client and ignore the clientside warning?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 7790
Joined: Fri Jun 03, 2016 1:17 pm

Re: ifconfig and static key - error or warning

Post by TinCanTech » Sat Sep 05, 2020 4:22 pm

zinpin wrote:
Sat Sep 05, 2020 2:59 pm
Server Config
topology subnet
You did not read the howto very carefully ..
zinpin wrote:
Sat Sep 05, 2020 2:59 pm
Do I just leave the line in the client and ignore the clientside warning?
Ignoring warnings is the fastest way to fail.

zinpin
OpenVpn Newbie
Posts: 4
Joined: Sat Sep 05, 2020 2:08 pm

Re: ifconfig and static key - error or warning

Post by zinpin » Sat Sep 05, 2020 5:24 pm

TinCanTech wrote:
Sat Sep 05, 2020 4:22 pm
zinpin wrote:
Sat Sep 05, 2020 2:59 pm
Server Config
topology subnet
You did not read the howto very carefully ..
Not helpful. For all you know I'm dyslexic and/or have some form of learning disorder. Your response isn't very inclusionary or helpful at all.
Re-reading it I still can't see what the problem is.
Ignoring warnings is the fastest way to fail.
There are a lot of rubbish developers out there who don't properly maintain their warnings so I've found that most warnings are spurious.
However, given this is new software to me, I figured "I'll ask the experts" because hey, maybe the warning is important or I missed something obvious.

Anyway, doesn't matter, I'm done with OpenVPN; solved my problem much more simply. Thanks anyway.

User avatar
Pippin
Forum Team
Posts: 869
Joined: Wed Jul 01, 2015 8:03 am

Re: ifconfig and static key - error or warning

Post by Pippin » Sun Sep 06, 2020 8:10 am

Please read

Code: Select all

--topology mode
in manual 2.4:
https://community.openvpn.net/openvpn/w ... n24ManPage

Post Reply