File: README.md

package info (click to toggle)
knockd 0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 640 kB
  • sloc: ansic: 1,878; sh: 1,465; makefile: 31
file content (56 lines) | stat: -rw-r--r-- 1,690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
## knock: A port-knocking implementation

Copyright (c) 2004, Judd Vinet <jvinet@zeroflux.org>

### ABOUT  

This is a port-knocking server/client.  Port-knocking is a method where a
server can sniff one of its interfaces for a special "knock" sequence of
port-hits.  When detected, it will run a specified event bound to that port
knock sequence.  These port-hits need not be on open ports, since we use
libpcap to sniff the raw interface traffic.


### BUILDING

To build knockd, make sure you have libpcap and the autoconf tools
installed. Then run the following:

    $ autoreconf -fi
    $ ./configure --prefix=/usr/local
    $ make
    $ sudo make install


### EXAMPLE  

The example below could be used to run a strict (DENY policy) firewall that
can only be accessed after a successful knock sequence.

  1. Client sends four TCP SYN packets to Server, at the following ports:
     38281, 29374, 4921, 54918
  2. Server detects this and runs an iptables command to open port 22 to
     Client.
  3. Client connects to Server via SSH and does whatever it needs to do.
  4. Client sends four more TCP SYN packets to Server:  37281, 8529,
     40127, 10100
  5. Server detects this and runs another iptables command to close port
     22 to Client.


### KNOCKING CLIENTS

The accompanying knock client is very basic.  If you want to do more advanced
knocks (eg, setting specific tcp flags) then you should take look at more
powerful clients.

  - [sendip](http://freshmeat.net/projects/sendip/)


### OTHER IMPLEMENTATIONS  

Here are some other implementations of port-knocking:

  - [pasmal](http://sourceforge.net/projects/pasmal/)
  - [doorman](http://doorman.sourceforge.net/)