tonyseek / openvpn-status

Parse OpenVPN status logs in Python
https://openvpn-status.readthedocs.io
MIT License
83 stars 31 forks source link

ParsingError:expected valid format: u'192.168.100.110C' does not appear to be an IPv4 or IPv6 address #14

Open ckmark opened 4 years ago

ckmark commented 4 years ago

my status log as follows,in the ROUTING TABLE,the Virtual Address has "C": OpenVPN CLIENT LIST Updated,Thu Nov 14 22:45:09 2019 Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since 564D742F3D607BA2CBA6A83BDF58A302,10.240.200.64:48752,65029,73050,Thu Nov 14 21:47:54 2019 a,10.240.1.88:1194,86454,67373,Thu Nov 14 21:48:00 2019 ROUTING TABLE Virtual Address,Common Name,Real Address,Last Ref 192.168.100.110C,564D742F3D607BA2CBA6A83BDF58A302,10.240.200.64:48752,Thu Nov 14 22:45:04 2019 10.100.0.6,564D742F3D607BA2CBA6A83BDF58A302,10.240.200.64:48752,Thu Nov 14 21:47:54 2019 10.100.0.10,a,10.240.1.88:1194,Thu Nov 14 22:45:04 2019 192.168.100.0/24,564D742F3D607BA2CBA6A83BDF58A302,10.240.200.64:48752,Thu Nov 14 21:47:54 2019 GLOBAL STATS Max bcast/mcast queue length,1 END

morphZ commented 3 years ago

I have this problem too. Couldn't figure out why openVPN keeps adding the C to the client IPs. Still: The proposed fix seems good, can we merge it and release a new version? Thanks!

mikysal78 commented 1 year ago

Hi, i have same problem

OpenVPN parsing error: expected valid format: 'da:d6:61:1e:21:ec@0' does not appear to be an IPv4 or IPv6 address

I using OpenVPN 2.5.1 and file utils.py from pullrequest #27 my log files is:

OpenVPN CLIENT LIST
Updated,2023-04-12 04:34:21
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
LaMalfa102,151.50.xx.xx:42750,8386,20787,2023-04-12 04:33:21
ReginaMargherita116-AP,195.32.xx.xx:44074,3606,22072,2023-04-12 04:33:22
Test,5.91.xx.xx:15467,8908,17399,2023-04-12 04:33:29
SyskrackLab,95.235.xx.xx:60228,8155,20116,2023-04-12 04:33:22
ReginaMargherita116,195.32.xx.xx:54539,9038,21396,2023-04-12 04:33:21
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
da:d6:61:1e:21:ec@0,ReginaMargherita116-AP,195.32.xx.xx3:44074,2023-04-12 04:34:10
5e:df:36:aa:f2:c3@0,SyskrackLab,95.235.xx.xx:60228,2023-04-12 04:34:04
92:aa:0a:33:7e:a5@0,LaMalfa102,151.50.xx.xx:42750,2023-04-12 04:34:09
d2:c7:32:c9:14:51@0,ReginaMargherita116,195.32.xx.xx:54539,2023-04-12 04:34:14
ce:eb:92:5c:ae:50@0,Test,5.91.xx.xx1:15467,2023-04-12 04:34:05
GLOBAL STATS
Max bcast/mcast queue length,5
END