SYSTEM WARNING: 'date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in '/usr/share/mantis/www/core.php' line 264

0004396: openvpnbridge.py: error: Invalid ip or netmask - MantisBT
MantisBT - Endian Firewall
View Issue Details
0004396Endian FirewallOpenVPN Client and Serverpublic2012-07-20 12:342012-08-08 14:29
ardit-endian 
andrea-endian 
normalmajorhave not tried
resolvedfixed 
2.4 
2.5 
0004396: openvpnbridge.py: error: Invalid ip or netmask
When using tun in openvpngw2gw with endian as Client server this is shown on the log:



Jul 20 14:29:07 efw tix[6483]: Fri Jul 20 14:29:07 2012 event_wait : Interrupted system call (code=4)
Jul 20 14:29:07 efw tix[6483]: Fri Jul 20 14:29:07 2012 /usr/local/bin/dir.d-exec /etc/openvpn/ifdown.client.d/ openvpntun0 1500 1542 172.17.67.6 172.17.67.5 init
Jul 20 14:29:07 efw tix[6483]: usage: openvpnbridge.py <options> <device> <mtu> <mru> <local_ip> <local_netmask|remote_ip> [init|restart]
Jul 20 14:29:07 efw tix[6483]:
Jul 20 14:29:07 efw tix[6483]: openvpnbridge.py: error: Invalid ip or netmask '172.17.67.6 172.17.67.5'
Jul 20 14:29:07 efw tix[6483]: run-parts: /etc/openvpn/ifdown.client.d//00bridge exited with return code 2
Jul 20 14:29:07 efw tix[6483]: Fri Jul 20 14:29:07 2012 /sbin/ip addr del dev openvpntun0 local 172.17.67.6 peer 172.17.67.5


Not knowing the code noticed however something that may cause this issue:

 except ValueError:
        debug(traceback.format_exc())
        parser.error("Invalid ip or netmask '%s %s'"%(ip, mask))

should the "mask" be there?
as the script is expeting ip,mask but it's pushed '172.17.67.6 172.17.67.5'
purple
Issue History
2012-07-20 12:34ardit-endianNew Issue
2012-07-20 12:34ardit-endianTag Attached: purple
2012-08-08 12:15andrea-endianNote Added: 0007998
2012-08-08 12:38andrea-endianNote Edited: 0007998
2012-08-08 14:28andrea-endianAssigned To => andrea-endian
2012-08-08 14:29andrea-endianNote Added: 0007999
2012-08-08 14:29andrea-endianStatusnew => resolved
2012-08-08 14:29andrea-endianFixed in Version => 2.5
2012-08-08 14:29andrea-endianResolutionopen => fixed

Notes
(0007998)
andrea-endian   
2012-08-08 12:15   
(edited on: 2012-08-08 12:38)
According to the OpenVPN documentation, for tun, the openvpnbridge script is execute with the following parameters:
tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [ init | restart ]

For tap, the parameters are:
tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [ init | restart ]

openvpnbridge.py accepts both the tun/tap parameters:
usage: openvpnbridge.py <options> <device> <mtu> <mru> <local_ip> <local_netmask|remote_ip> [init|restart]

When I disconnect the client, the script is called with the following parameters:
--remove openvpntun0 1500 1542 192.168.100.2 255.255.255.0 init

(0007999)
andrea-endian   
2012-08-08 14:29   
Fixed in 2.5, 2.4-arm and 2.4