diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/peer2anonet/README | 40 | ||||
-rwxr-xr-x | contrib/peer2anonet/peer2anonet | 6 |
2 files changed, 41 insertions, 5 deletions
diff --git a/contrib/peer2anonet/README b/contrib/peer2anonet/README index ba98280..8b8eacf 100644 --- a/contrib/peer2anonet/README +++ b/contrib/peer2anonet/README @@ -23,10 +23,42 @@ USAGE: NOTES: - peer2anonet exports the /service/$PEER/run file to - /etc/peer2anonet/peers/$PEER/run. If you need to - create customizations for peerings then make adjustments - to that file. + KEY PAIRS: + + before running peer2anonet to configure peers you can use + quicktun to generate keypairs: + + quicktun.keypair</dev/random + + RUN CHANGES: + + peer2anonet exports the /service/$PEER/run file to + /etc/peer2anonet/peers/$PEER/run. If you need to + create customizations for peerings then make adjustments + to that file. + + EXAMPLES: + + ./peer2anonet --configure + + Enter your AnoNet subnet: 1.2.3.0 + Enter your AnoNet router: 1.2.3.1 + Enter your peering ip: 1.2.3.4 + Enter your AnoNet asn: 1234 + + + ./peer2anonet --configure-peer + + Enter your peer's name: d3v11 + Enter your peer's remote ip: 11.11.55.1 + Enter your peer's peering ip: 1.1.5.2 + Enter your peer's remote port: 201150 + Enter your peer's asn: 1150 + Enter your peer's public key: * see keypairs above * + Enter your private key: * see keypairs above * + + # peer2anonet uses the following for port configurations: + LOCAL_PORT=20${PEERASN:0:4} diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 1893439..98fef00 100755 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -4,6 +4,10 @@ if [[ $(id -u) != 0 ]]; then exit 1 fi +if [ -e /services/bird ]; then + [ -e /etc/peer2anonet/bird.tar ] || (cd /services ; tar /etc/peer2anonet/bird.tar bird) +fi + USAGE(){ echo -e '\npeer2anonet:' echo -e '\n --configure generate a new local configuration and exit' @@ -198,7 +202,7 @@ protocol bgp $PEER { table AnoNet_routes; export REMOTE_ADDRESS=$REMOTEIP export REMOTE_PORT=$PEERPORT -export LOCAL_PORT=2${PEERASN:0:5} +export LOCAL_PORT=20${PEERASN:0:4} export PRIVATE_KEY=$SECKEY export PUBLIC_KEY=$PUBKEY export TUN_MODE=1 |