<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">

<!--
	``MakeMan'' SGML Template for a man page
	For more Information, please see http://mama.sourceforge.net
-->

<refentry id="netclipd">
	<refmeta>
		<refentrytitle>NETCLIPD</refentrytitle>
		<manvolnum>8</manvolnum>
		<refmiscinfo class="date">September 1st, 2001</refmiscinfo>
		<refmiscinfo class="source">netclip</refmiscinfo>
		<refmiscinfo class="title">Networked User's Manual</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>netclipd</refname>
		<refpurpose>the netclip server</refpurpose>
	</refnamediv>

	<refsynopsisdiv>
		<cmdsynopsis>
			<command>netclipd</command>
		</cmdsynopsis>
	</refsynopsisdiv>

	<refsect1>
		<title>DESCRIPTION</title>
		<para>
			<command>netclip</command> is a client/server application to
			copy/paste text over your local network.
			<command>netclipd</command>, part of <emphasis>netclip</emphasis>,
			is the server managing the remove clipboard.  Per default, the
			server listens on port 6671 (this can be changed in
			<filename>config.h</filename>).
		</para>
	</refsect1>

	<refsect1>
		<title>USAGE</title>
		<para>
			Generally, <command>netclipd</command> should be started a boot
			time.  To achieve this, the script is placed into
			<filename>/usr/rc.d/init.d/</filename>.  To activate this script
			at startup you must first get to know your runlevel (at
			<filename>/etc/inittab</filename>) and then make a link like this
			(where $RUNLEVEL is the runlevel.
		</para>
		<para>
			<command>ln -s</command>
			<filename>/etc/rc.d/rc$RUNLEVEL.d/S99netclipd
			/etc/rc.d/init.d/netclipd</filename> 
		</para>
	</refsect1>
	
	<refsect1> 
		<title>SECURITY</title>
		<para> 

			Please note that when installing the default way,
			<command>netclipd</command> will be started as root which could be
			a security issue. If security is important and the computer is
			also connected with another network (like for example the
			internet), you can firewall port 6671 (man ipchains, but make sure
			that you don't block the local network, since the other hosts on
			this network are going to connect to this port). You can also make
			a user (netclipd) and start the server as this user. Note that the
			file <filename>/var/netclip/current</filename> must be writable
			for this user!
		</para>
		<para>
			To block the port:
		</para>
		<para>
			<command>ipchains -A input -p tcp -d externalip/externalmask 6671 -j REJECT</command>
		</para>
		<para>
			Test <command>netclipd</command> by telnetting to it:
		</para>
		<para>
			<command>telnet</command> <emphasis>localhost 6671</emphasis>
		</para>
		<para>
			There, use <emphasis>r</emphasis> to read the current netclipboard
			and <emphasis>w</emphasis> to write a new one.  This also
			illustrates the security of the server. If you don't block the
			port then everybody on the internet can read and set your
			netclipboard. Some cracking people can also root your box using
			programming mistakes made in <command>netclipd</command>. To avoid
			this, run <command>netclipd</command> as user and block the port
			if the computer where you are running netclipd on is also
			connected to a non-privat network Password protection and ssh
			encryption are plans for future releases.  
		</para>
	</refsect1>

	<refsect1>
		<title>FILES</title>
		<para>
			<variablelist>
				<varlistentry>
					<term><filename>/usr/rc.d/init.d/netclipd</filename></term>
					<listitem>
						<para>
							The <command>netclipd</command> startup script.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term><filename>/var/netclip/current</filename></term>
					<listitem>
						<para>
							contains the contents of the cliboard
						</para>
					</listitem>
				</varlistentry>
			</variablelist>
		</para>
	</refsect1>

	<refsect1>
		<title>BUGS</title>
		<para>
			Please report bugs to the Author.
		</para>
	</refsect1>

	<refsect1>
		<title>SEE ALSO</title>
		<para>
			<command>gtknetclip(1)</command>
		</para>
		<para>
			<ulink url="http://netclip.freax.eu.org">netclip Homepage</ulink>
		</para>
	</refsect1>

	<refsect1>
		<title>AUTHOR</title>
		<para>
			Philip Van Hoof <email>freax@pandora.be</email>
		</para>
		<para>
			This man-page was written by Jan Schaumann
			<email>jschauma@netmeister.org</email> as part of "<ulink
			url="http://www.netmeister.org/misc/m2p2/index.html">The Missing
			Man Pages Project</ulink>".
		</para>
	</refsect1>
</refentry>
