OpenVPN management interface on windows machine with OpenVPN Server

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
Kaos981
OpenVpn Newbie
Posts: 6
Joined: Mon Oct 16, 2017 12:24 pm

OpenVPN management interface on windows machine with OpenVPN Server

Post by Kaos981 » Tue Oct 17, 2017 10:42 am

Hi guys

I've tried to search for a solution on the forum but unfortunately i had no luck.
I have this problem: i've tried to configure the server.conf file with the string

Code: Select all

management localhost 7505
and restarted the openvpn server instance, but i can't connect to the management interface via telnet on the same machine, windows says that can't connect to the ip address 127.0.0.1 7505 and doesn't exist.
Can someone please help me to understand how to fix this?
Best regards
Marco

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN management interface on windows machine with OpenVPN Server

Post by TinCanTech » Tue Oct 17, 2017 11:26 am

Try:

Code: Select all

management 127.0.0.1 7505

Kaos981
OpenVpn Newbie
Posts: 6
Joined: Mon Oct 16, 2017 12:24 pm

Re: OpenVPN management interface on windows machine with OpenVPN Server

Post by Kaos981 » Tue Oct 17, 2017 12:26 pm

Hi, thanks for your reply
Nothing, don't work even with management 127.0.0.1 7505 I also disabled windows firewall and permanently enabled telnet server from windows services
This is my log:

Code: Select all

Tue Oct 17 14:09:46 2017 OpenVPN 2.3.10 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Jan  4 2016
Tue Oct 17 14:09:46 2017 Windows version 6.1 (Windows 7)
Tue Oct 17 14:09:46 2017 library versions: OpenSSL 1.0.1q 3 Dec 2015, LZO 2.09
Enter Management Password:
Tue Oct 17 14:09:46 2017 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Tue Oct 17 14:09:46 2017 Need hold release from management interface, waiting...
Tue Oct 17 14:09:46 2017 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Tue Oct 17 14:09:47 2017 MANAGEMENT: CMD 'state on'
Tue Oct 17 14:09:47 2017 MANAGEMENT: CMD 'log all on'
Tue Oct 17 14:09:47 2017 MANAGEMENT: CMD 'hold off'
Tue Oct 17 14:09:47 2017 MANAGEMENT: CMD 'hold release'
Tue Oct 17 14:09:47 2017 Diffie-Hellman initialized with 1024 bit key
Tue Oct 17 14:09:47 2017 Socket Buffers: R=[8192->8192] S=[8192->8192]
Tue Oct 17 14:09:47 2017 ROUTE_GATEWAY 192.168.20.254/255.255.255.0 I=11 HWADDR=50:65:f3:79:fd:b4
Tue Oct 17 14:09:47 2017 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Oct 17 14:09:47 2017 MANAGEMENT: >STATE:1508242187,ASSIGN_IP,,10.8.0.1,
Tue Oct 17 14:09:47 2017 open_tun, tt->ipv6=0
Tue Oct 17 14:09:47 2017 TAP-WIN32 device [Connessione alla rete locale (LAN)] opened: \\.\Global\{7C9E6B03-50FC-4C77-845C-75378C2F5A08}.tap
Tue Oct 17 14:09:47 2017 TAP-Windows Driver Version 9.21 
Tue Oct 17 14:09:47 2017 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.1/255.255.255.252 on interface {7C9E6B03-50FC-4C77-845C-75378C2F5A08} [DHCP-serv: 10.8.0.2, lease-time: 31536000]
Tue Oct 17 14:09:47 2017 Sleeping for 10 seconds...
Tue Oct 17 14:09:57 2017 Successful ARP Flush on interface [14] {7C9E6B03-50FC-4C77-845C-75378C2F5A08}
Tue Oct 17 14:09:57 2017 MANAGEMENT: >STATE:1508242197,ADD_ROUTES,,,
Tue Oct 17 14:09:57 2017 C:\Windows\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.2
Tue Oct 17 14:09:57 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Tue Oct 17 14:09:57 2017 Route addition via IPAPI succeeded [adaptive]
Tue Oct 17 14:09:57 2017 Listening for incoming TCP connection on [undef]
Tue Oct 17 14:09:57 2017 TCPv4_SERVER link local (bound): [undef]
Tue Oct 17 14:09:57 2017 TCPv4_SERVER link remote: [undef]
Tue Oct 17 14:09:57 2017 MULTI: multi_init called, r=256 v=256
Tue Oct 17 14:09:57 2017 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Tue Oct 17 14:09:57 2017 MULTI: TCP INIT maxclients=60 maxevents=64
Tue Oct 17 14:09:57 2017 Initialization Sequence Completed
Tue Oct 17 14:09:57 2017 MANAGEMENT: >STATE:1508242197,CONNECTED,SUCCESS,10.8.0.1
And this is the dos prompt (in Italian language)

Code: Select all

Microsoft Telnet Client

Il carattere di Escape è 'CTRL++'

Microsoft Telnet> 127.0.0.1 7505
Comando non valido. Digitare ?/help per la Guida
Microsoft Telnet> open 127.0.0.1 7505
Connessione a 127.0.0.1...Impossibile aprire una connessione con l'host. sulla porta 7505: Connessione non riuscita
Microsoft Telnet>
Any other suggestion? Thanks in advance
Marco

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN management interface on windows machine with OpenVPN Server

Post by TinCanTech » Tue Oct 17, 2017 12:58 pm

Kaos981 wrote:
Tue Oct 17, 2017 12:26 pm
MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
This is the connection from openvpn_gui.exe ..
You cannot use the management port for telnet while using the GUI.

Kaos981
OpenVpn Newbie
Posts: 6
Joined: Mon Oct 16, 2017 12:24 pm

Re: OpenVPN management interface on windows machine with OpenVPN Server

Post by Kaos981 » Tue Oct 17, 2017 1:15 pm

Ah!!! Thanks, you got it.
So there are other possibilities to kill some clients from the GUI? Or how can i start OpenVPN without GUI.
Many thanks for your precious help.
Marco

Kaos981
OpenVpn Newbie
Posts: 6
Joined: Mon Oct 16, 2017 12:24 pm

Re: OpenVPN management interface on windows machine with OpenVPN Server

Post by Kaos981 » Tue Oct 17, 2017 3:10 pm

Hi again, found this on the documentation, is this the right way to start the server without the GUI?
Configuring OpenVPN to run automatically on system startup:
Windows

The Windows installer will set up a Service Wrapper, but leave it turned off by default. To activate it, go to Control Panel / Administrative Tools / Services, select the OpenVPN service, right-click on properties, and set the Startup Type to Automatic. This will configure the service for automatic start on the next reboot.

When started, the OpenVPN Service Wrapper will scan the \Program Files\OpenVPN\config folder for .ovpn configuration files, starting a separate OpenVPN process on each file.
Marco

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN management interface on windows machine with OpenVPN Server

Post by TinCanTech » Tue Oct 17, 2017 4:32 pm

That is one way ..

Another is to open an administrator cmd and type the start command:

Code: Select all

C:\Program Files\Openvpn\config> ..\bin\openvpn config-file-name.ovpn

Kaos981
OpenVpn Newbie
Posts: 6
Joined: Mon Oct 16, 2017 12:24 pm

Re: OpenVPN management interface on windows machine with OpenVPN Server

Post by Kaos981 » Wed Oct 18, 2017 2:17 pm

Hi, ok i'll try soon and i let you know.
Many thanks.
Marco

Kaos981
OpenVpn Newbie
Posts: 6
Joined: Mon Oct 16, 2017 12:24 pm

[Solved] OpenVPN management interface on windows machine with OpenVPN Server

Post by Kaos981 » Sun Oct 22, 2017 5:04 am

Thank you TinCanTech, it works
Marco

Post Reply