Go Back   MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 30, 2012, 09:07 AM   #1
dazey
macrumors 6502
 
Join Date: Dec 2005
Mountain Lion Server-VPN Status

Hi, this may be a dumb question but how do you see the VPN status in mountain lion server? By this I mean, number of clients connected, their IP addresses and usernames. In 10.5 server (from which I am transitioning) the VPN page of the server app gave this information but it is completely gone in the 10.8 server app with only config remaining. Hopefully I am being blind but I can't find the info anywhere??!
dazey is offline   0 Reply With Quote
Old Oct 30, 2012, 03:40 PM   #2
switon
macrumors 6502a
 
Join Date: Sep 2012
RE: serveradmin fullstatus vpn...

Hi dazey,

Yeah, it is sad that Mac OS X Server has eliminated the GUI interface to serveradmin...but, with that, it means that we must now get used to using the commandline more. The following command returns the variables associated with VPN and you will note that one of the variables is the current connections. If you need to check this often, you could write an alias that runs this command and greps for the CurrentConnections:

sudo serveradmin fullstatus vpn

Regards,
Switon

P.S. For example, to see the current L2TP and PPTP connections, run the following Terminal command:

sudo serveradmin fullstatus vpn | grep -i currentconnections

Last edited by switon; Oct 30, 2012 at 03:49 PM. Reason: Added P.S.
switon is offline   0 Reply With Quote
Old Oct 31, 2012, 10:52 AM   #3
dazey
Thread Starter
macrumors 6502
 
Join Date: Dec 2005
And not to mention that the new server app crashes at least once a day...

Thanks, very useful, gets me closer at least (not giving me the user names and allocated IPs but I can find that out other routes)
dazey is offline   0 Reply With Quote
Old Nov 2, 2012, 04:28 AM   #4
switon
macrumors 6502a
 
Join Date: Sep 2012
RE: further uses of serveradmin...

Quote:
Originally Posted by dazey View Post
And not to mention that the new server app crashes at least once a day...

Thanks, very useful, gets me closer at least (not giving me the user names and allocated IPs but I can find that out other routes)
Hi dazey,

I just thought I'd add a few more serveradmin commands that you might find useful. For instance, say you wish to disconnect users who have mounted shared disks via AFP, then you could do the following (the lines beginning with # are comments): [execute as root or under sudo]


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# To turn on AFP Activity Logging:
serveradmin settings afp:activityLog = "yes"
# To disconnect a specific user from AFP:
# Find the user's sessionID:
serveradmin command afp:command = getConnectedUsers
afp:state = "RUNNING"
afp:usersArray:_array_index:0:lastUseElapsedTime = 22
afp:usersArray:_array_index:0:minsToDisconnect = 0
afp:usersArray:_array_index:0:sessionType = "tcp"
afp:usersArray:_array_index:0:state = 1
afp:usersArray:_array_index:0:serviceType = "afp"
afp:usersArray:_array_index:0:ipAddress = "10.0.0.100"
afp:usersArray:_array_index:0:sessionID = 124
afp:usersArray:_array_index:0:loginElapsedTime = 792
afp:usersArray:_array_index:0:disconnectID = 0
afp:usersArray:_array_index:0:name = "switon"
afp:usersArray:_array_index:0:flags = 1
afp:timeStamp = "2012-11-01 09:52:20 -0600"
# Disconnect user in 1 minute:
serveradmin command
afp:command = disconnectUsers
afp:message = "You are doomed, too"
afp:minutes = 1
afp:sessionIDsArray:_array_index:0 = 124
<Cntl-D>
#----------------------------------------------------------------------------


The above commands turn on AFP logging, determine the sessionID of a connected user, and then disconnects that user from AFP. This is just an example of the use of the serveradmin commandline.

Switon
switon is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Share VPN connection with Mountain Lion Server velvia Mac OS X Server, Xserve, and Networking 0 Nov 30, 2013 02:54 AM
Anyone upgrade from Snow Leopard Server to Mountain Lion + Server.app? talmy Mac OS X Server, Xserve, and Networking 13 Jul 14, 2013 11:22 AM
Cisco VPN on 10.8 Mountain Lion Ripmax2000 OS X 10.8 Mountain Lion 14 Mar 16, 2013 02:53 PM
Mountain Lion Server VPN for home use irishv Mac OS X Server, Xserve, and Networking 7 Feb 5, 2013 10:59 AM
VPN Between Mountain Lion Server VPN Server and Native Mac Client - What's Missing??? 19austin85 Mac OS X Server, Xserve, and Networking 24 Sep 12, 2012 05:52 PM

Forum Jump

All times are GMT -5. The time now is 12:15 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC