- Shell 80%
- Python 15.9%
- Makefile 3%
- Dockerfile 1.1%
|
|
||
|---|---|---|
| bench | ||
| changelog | ||
| packaging | ||
| sbin | ||
| tools | ||
| vendor/mordord | ||
| .drone.yml | ||
| .gitignore | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| README_IT.md | ||
Mordor
The idea comes from this post: https://keinpfusch.net/e-possibile-farsi-una-darknet-privata/
Status: rudimentary, it works on the test bench (see Tests): a circuit, members, a portal, members' services and names. No packages yet, and the names are crude (see Limits today). Mordor is the dark sibling of Narnia.
Mordor is a private I2P network for a group of people. One computer is the central node: it is the first router of its own network, separate from the public I2P network, and keeps the circuit's names. The others, the members, get in with one file the central node's administrator hands out: whoever holds the file is in, whoever does not is turned away.
Inside, nobody reaches anybody by IP address: services are I2P destinations,
reached through encrypted tunnels across the other routers, by names such as
portal.mordor.i2p.
How it works
- mordord, a fork of i2pd (see below), is the router of every node.
- A closed family. All of the circuit's routers belong to one I2P family, whose key is in the circuit file, and talk only to routers of that family: a router without the key is turned away by everyone, even if it knows the network id and the central node's address.
- No outside world. The circuit has its own network id; the central node is its first router and reseeds from nobody; members meet the network through the central node, whose address is in the circuit file. No reseed server, no third party.
- A portal. The central node serves a page (lighttpd, reachable only
through the circuit) with a link for each of the circuit's names, and the
circuit's
hosts.txt. - Names from the central node. Members' address books subscribe to that
hosts.txt; the administrator adds names withmordor name. - A star. Members are usually behind a NAT and reach the central node, not each other: a member's tunnels to other members have one hop, always the central node; the central node's own services are entered at the central node itself. Traffic between members therefore goes through the central node, encrypted end to end between the two members.
Using it
Install mordord (vendor/mordord/mordord) and mordor (sbin/mordor) in
/usr/sbin; the central node also needs lighttpd, openssl and zip.
Central node (a static public IPv4 address; its port, TCP and UDP, open towards it):
sudo mordor circuit # asks the name and the public address
sudo mordor list # the circuit's names
sudo mordor name 'forum.NAME.i2p=DESTINATION' # what a member's "mordor service" printed
sudo mordor unname forum
sudo mordor clean
mordor circuit writes NAME.circuit: it holds the family's private key,
so whoever has it is in. Give it only to them.
Member:
sudo mordor join NAME.circuit
sudo mordor service forum 8080 # publish 127.0.0.1:8080; prints the line for the administrator
sudo mordor clean
Then set the browser's HTTP proxy to 127.0.0.1:4446 and open
http://portal.NAME.i2p/.
Limits today
- Names: members fetch
hosts.txta few minutes after starting, then every 12 hours (i2pd's subscription interval); a name changed reaches them, a name taken out does not. Narnia-like hourly, authoritative names need a change to mordord's address book: next on the list. - Hops: fixed by the star (no hop on the central node, one, the central node, on members); no setting yet.
- No packages, no rekey of the family yet; mordord runs as root.
What it is NOT
Mordor hides more than Narnia, but it is not a full darknet and must not be used as one.
- The administrator sees a lot. The central node is the first contact, the only floodfill and, today, the one hop of every member's tunnel: it learns every router's IP address and sees who talks to whom (not what they say: that is encrypted between the two ends).
- Small network, little anonymity. A star with one hop hides nothing from its centre; even with more hops, a small network cannot be very anonymous.
- Whoever has the circuit file is in. The administrator decides who gets it; if it leaks, the family key must be changed (planned: without throwing out the members already in).
- It is not the public I2P network or Tor. For anonymity among strangers, use those.
mordord
mordord is a fork of i2pd by the
PurpleI2P Project, kept as upstream's source plus a series of documented
patches in vendor/mordord, built static (one
binary for every distribution) with OpenSSL 3.5. Three patches today:
trust.familyis applied after the family certificates are loaded: without it, i2pd (3.0.0 included) restricts nothing and any router can join.- A router whose routes are restricted does not retry the public reseed servers for ever: without it, the central node never starts.
- A floodfill keeps its own destinations' LeaseSets: without it, the central node, the circuit's only floodfill, publishes the portal nowhere.
i2pd is under the BSD 3-clause licence, whose notice comes with mordord
(vendor/mordord/LICENSE). mordord is not an
official i2pd release and is not endorsed by PurpleI2P.
Tests
make bench (bench/run.sh) starts, in Docker on a network with no way out,
a central node made by mordor circuit, two members by mordor join and an
outsider that knows the network id and the central node's address but has no
family key. It checks that the central node reseeds from no public server,
that the outsider is turned away by everyone and cannot reach the portal,
that a member opens the portal by its address and by its name, and reaches
another member's service through the central node, and that mordor clean
leaves nothing behind.
Licence
Mordor: EUPL-1.2. mordord: i2pd's BSD 3-clause licence.