#971: "management tunnel <port>" ignores port
-------------------------------------+-------------------------------------
 Reporter:  berni                    |       Owner:  (none)
     Type:  Bug / Defect             |      Status:  new
 Priority:  minor                    |   Milestone:
Component:  Management               |     Version:  OpenVPN 2.4.4
 Severity:  Not set (select this     |  (Community Ed)
  one, unless your'e a OpenVPN       |  Resolution:
  developer)                         |
 Keywords:                           |
-------------------------------------+-------------------------------------

Comment (by tincantech):

 Replying to [comment:4 plaisthos]:
 > Untested patch that should fix this:

 The patch does not fix the problem.

 Note: build openvpn-git.master + the patch applied and `enable-systemd=no`
 then use root terminal to start and restart the process.

 For a while this patch appeared to work properly if `--server` was used
 but after several tests even this config failed eventually.

 On my first test, after 5 restarts the management port was correct and
 listening on the tunnel interface.

 On my second test, after 1 restart the port was randomised again ..
 (Log file attached)

 The following tests were run on my server which does not use `--server`
 but instead manually expands the `--server` helper directive. (This is a
 live server with one client and is in use everyday, it functions normally
 in every other respect)

 With `management tunnel 63110` in the config this happened:

 * Init:

   `Thu Feb  7 14:39:03 2019 us=862353 MANAGEMENT: TCP Socket listening on
 [AF_INET]10.63.110.101:63110`

 * SIGHUP 1 (`$ kill -1 $PID`)

   `Thu Feb  7 14:39:43 2019 us=733816 MANAGEMENT: TCP Socket listening on
 [AF_INET]10.63.110.101:63110`

 * SIGHUP 2 (`$ kill -1 $PID`)

   `Thu Feb  7 14:39:58 2019 us=845341 MANAGEMENT: TCP Socket listening on
 [AF_INET]10.63.110.101:63110`

 * SIGHUP 3 (`$ kill -1 $PID`)

   `Thu Feb  7 14:40:12 2019 us=952338 MANAGEMENT: TCP Socket listening on
 [AF_INET]10.63.110.101:63110`

 * SIGHUP 4 (`$ kill -1 $PID`)

   `Thu Feb  7 14:40:29 2019 us=61927 MANAGEMENT: TCP Socket listening on
 [AF_INET]10.63.110.101:0`

 * Netstat: `tcp        0      0 10.63.110.101:33655     0.0.0.0:*
 LISTEN`

 Running the same test a second time this happened:

 * Init:

   `Thu Feb  7 15:00:40 2019 us=5936 MANAGEMENT: TCP Socket listening on
 [AF_INET]10.63.110.101:63110`

 * SIGHUP 1 (`$ kill -1 $PID`)

   `Thu Feb  7 15:01:19 2019 us=948595 MANAGEMENT: TCP Socket listening on
 [AF_INET]10.63.110.101:0`

 * Netstat: `tcp        0      0 10.63.110.101:35625     0.0.0.0:*
 LISTEN`

-- 
Ticket URL: <https://community.openvpn.net/openvpn/ticket/971#comment:6>
OpenVPN Community <https://openvpn.net>
OpenVPN is a layer 2/3 SSL VPN

Reply via email to