Hi!

I've been struggling with integrating HP MSM760 with PacketFence. I'm using the 
latest version of both and seems like the deauthentication doesn't work. I've 
seen a few other threads where they've been having the same problem.

I've figured out an easy way to deauthenticate the user using SOAP manually, 
but need some help to understand how I can get it to work automatically when a 
user gets a violation etc.

I've been able to write a perl script that does it for me.

Logoff / deauthentication:
--
#!/usr/bin/perl -w

use strict;

use LWP::UserAgent;
use HTTP::Request::Common;

my $userAgent = LWP::UserAgent->new(agent => 'perl post');

my $message = "<x:Envelope 
xmlns:x=\"http://schemas.xmlsoap.org/soap/envelope/\"; 
xmlns:ns=\"http://www.procurve_mobility_msm.com/SOAP/API/1.7/\";>
                <x:Header/>
                <x:Body>
                        <ns:ExecuteNOCLogout>
                                <ns:sessionID>[Acct-Session-ID]</ns:sessionID>
                        </ns:ExecuteNOCLogout>
                </x:Body>
                </x:Envelope>";

my $response = $userAgent->request(POST 'http://[Controller IP]:448/SOAP',
Content_Type => 'text/xml; charset=utf-8',
SOAPAction => 
'http://www.procurve_mobility_msm.com/SOAP/API/1.7/ExecuteNOCLogout',
Content => $message);

print $response->error_as_HTML unless $response->is_success;

print $response->as_string;
--

Logon / authentication:
--
#!/usr/bin/perl -w

use strict;

use LWP::UserAgent;
use HTTP::Request::Common;

my $userAgent = LWP::UserAgent->new(agent => 'perl post');

my $message = "<x:Envelope 
xmlns:x=\"http://schemas.xmlsoap.org/soap/envelope/\"; 
xmlns:ns=\"http://www.procurve_mobility_msm.com/SOAP/API/1.7/\";>
                <x:Header/>
                <x:Body>
                        <ns:ExecuteNOCLoginRequest>
                                <ns:userIPAddr>[Guest IP]</ns:userIPAddr>
                                <ns:username>[Guest Username]</ns:username>
                                <ns:password>[Guest Password / any will 
work]</ns:password>
                        </ns:ExecuteNOCLoginRequest>
                </x:Body>
                </x:Envelope>";

my $response = $userAgent->request(POST 'http://[Controller IP]:448/SOAP',
Content_Type => 'text/xml; charset=utf-8',
SOAPAction => 
'http://www.procurve_mobility_msm.com/SOAP/API/1.7/ExecuteNOCLoginRequest',
Content => $message);

print $response->error_as_HTML unless $response->is_success;

print $response->as_string;
--

My question to all of you! Any idea how I can get the deauthentication to work 
"automatically" instead of it trying SNMP / SSH?

Best regards,
Simon Gottschlag
------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to