207 lines
3.5 KiB
HTML
207 lines
3.5 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Server: Administration</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
|
"><LINK
|
|
REL="HOME"
|
|
TITLE="VPN HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="Implementation"
|
|
HREF="implemenetation.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Adding users"
|
|
HREF="x523.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Client: Build the kernel"
|
|
HREF="x554.html"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>VPN HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x523.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 5. Implementation</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x554.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="AEN532">5.12. Server: Administration</H1
|
|
><P
|
|
> One of the advantages to using this system for user accounts is that you
|
|
can take advantage of the UNIX user administration commands. Since each client
|
|
is logged in as a user, you can use standard methods to get user statistics.
|
|
The following are a few commands that I like to use to see what all is going on.
|
|
</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><DIV
|
|
CLASS="variablelist"
|
|
><DL
|
|
><DT
|
|
>who</DT
|
|
><DD
|
|
><P
|
|
> Prints the users currently logged in, as well as when they logged in,
|
|
from where (name or IP), and on which port.
|
|
</P
|
|
></DD
|
|
><DT
|
|
>w</DT
|
|
><DD
|
|
><P
|
|
> This command prints a more extensive listing of who is currently logged
|
|
in. It also tells you uptime and load averages for the system. It also lists
|
|
the user's current process (which should be -pppd for VPN clients) as well
|
|
as idle time, and current CPU usage for all processes as well as the current
|
|
process. Read the <TT
|
|
CLASS="literal"
|
|
>w</TT
|
|
> man page for more info.
|
|
</P
|
|
></DD
|
|
><DT
|
|
>last [username]</DT
|
|
><DD
|
|
><P
|
|
> This lists the login history for the specified user, or for all users if
|
|
a username is not provided. It's most useful for finding out how well
|
|
the tunnels are running as it prints the length of time that the user
|
|
was logged in, or states that the user is still logged in. I should warn
|
|
you that on a system that has been up a long time, this list can grow
|
|
extremely long. Pipe is through <TT
|
|
CLASS="literal"
|
|
>grep</TT
|
|
> or <TT
|
|
CLASS="literal"
|
|
>head</TT
|
|
> to find
|
|
out exactly what you want to know.
|
|
</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
>
|
|
</P
|
|
><P
|
|
> You can also control which users are allowed to connect by modifying the
|
|
<TT
|
|
CLASS="filename"
|
|
>/home/vpn-users/.ssh/authorized_keys</TT
|
|
> file. If you remove the user's
|
|
public key line from this file, they won't be able to log in.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x523.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x554.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Adding users</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="implemenetation.html"
|
|
ACCESSKEY="U"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Client: Build the kernel</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |