summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick <nick@somerandomnick.ano>2011-11-29 20:04:55 +0000
committerNick <nick@somerandomnick.ano>2011-11-29 20:04:55 +0000
commit84c8ec4218fbf18341cca859ca1c1efe32ec7472 (patch)
tree04e0d501a79e86d54668b0c5a1b352785c03f5f0
parent03e1f307ae23f992d6bb849d5f2a11946f0cf9b9 (diff)
parent11781e9b746464c0260eebe8183e3acdc8a1291f (diff)
downloadresdb-84c8ec4218fbf18341cca859ca1c1efe32ec7472.tar.gz
resdb-84c8ec4218fbf18341cca859ca1c1efe32ec7472.zip
Merge commit '11781e9b746464c0260eebe8183e3acdc8a1291f'
-rw-r--r--contrib/peer2anonet/README113
-rw-r--r--contrib/peer2anonet/README.html132
-rwxr-xr-xcontrib/peer2anonet/peer2anonet128
-rw-r--r--db/dom/ano/demontrox/ns/a.ns.demontrox.ano2
-rw-r--r--db/dom/ano/gunsuit/ns/a.ns.d3v11.ano (renamed from db/dom/ano/demontrox/ns/1.1.9.153)0
-rw-r--r--db/dom/ano/gunsuit/owner1
-rw-r--r--db/udpmsg4/GunSuit/@/.gitignore1
-rw-r--r--db/udpmsg4/GunSuit/@/default.key1
-rw-r--r--db/udpmsg4/GunSuit/@/owner1
-rw-r--r--db/udpmsg4/GunSuit/@/path1
10 files changed, 235 insertions, 145 deletions
diff --git a/contrib/peer2anonet/README b/contrib/peer2anonet/README
deleted file mode 100644
index 1693e7c..0000000
--- a/contrib/peer2anonet/README
+++ /dev/null
@@ -1,113 +0,0 @@
-DESCRIPTION:
-
- peer2anonet is an autoconfiguration utility for setting
- up core services on AnoNet2. Enjoy :-).
-
-DEPENDS ON:
-
- quicktun, bird, daemontools(non-deb), bash
-
-AUTHOR:
-
- d3v11 from www.d3v11.ano somtimes, maybe, dunno.
-
- REPORT BULLSHIT TO:
-
- IRC:
-
- /relayhell/d3v11
-
- EMAIL:
-
- d3v11@d3v11.ano
-
-USAGE:
-
- ./contrib/peer2anonet/peer2anonet --configure generate a new local configuration and exit
-
- ./contrib/peer2anonet/peer2anonet --update regenerate peer configurations
-
- ./contrib/peer2anonet/peer2anonet --configure-peer generate a new peer configuration and update
-
- ./contrib/peer2anonet/peer2anonet --rm-peer remove a peer configuration and update
-
- ./contrib/peer2anonet/peer2anonet --install-daemontools installs daemontools
-
- ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp installs ucspi-tcp
-
- ./contrib/peer2anonet/peer2anonet --install-djbdns installs djbdns
-
- ./contrib/peer2anonet/peer2anonet --configure-dns configures dnscache and tinydns zones
-
-RTFM:
-
- CONFIGURE:
-
- I highly recommend that before you use peer2anonet
- you ./configure resdb with tinydns support.
-
- ./contrib/peer2anonet/peer2anonet --configure
-
- EXAMPLES:
-
- 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
-
- CONFIGURE PEER:
-
- ./contrib/peer2anonet/peer2anonet --configure-peer
-
- KEY PAIRS:
-
- before running peer2anonet to configure peers you can use
- quicktun to generate keypairs:
-
- quicktun.keypair</dev/random
-
- CLIENT PORT:
-
- peer2anonet uses '20' plus the first four digits of your peer's asn
- as the `clientport'.
-
- LOCAL_PORT=20${PEERASN:0:4}
-
- EXAMPLES:
-
- 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 KEY PAIRS above *
- Enter your private key: * see KEY PAIRS above *
-
- 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.
-
- CONFIGURE DNS:
-
- If you did not ./configure resdb with tinydns support
- then you need to do that before using this function.
-
- also before using you will need to have installed
- daemontools, djbdns, and ucspi-tcp. peer2anonet
- can do this for you with --install-* options.
-
- ./contrib/peer2anonet/peer2anonet --configure-dns
-
- COMPLAIN:
-
- If this README doesn't tell you what you need to know
- you can head over to www.d3v11.ano/peering. If that
- doesn't get you what you want then either complain to
- me or shoot both of us in the face.
-
-
-
-
diff --git a/contrib/peer2anonet/README.html b/contrib/peer2anonet/README.html
new file mode 100644
index 0000000..6866354
--- /dev/null
+++ b/contrib/peer2anonet/README.html
@@ -0,0 +1,132 @@
+<html><body bgcolor="#000000"><font color="white">
+<pre>
+<b>DESCRIPTION:</b>
+
+ peer2anonet is an autoconfiguration utility for setting
+ up core services on AnoNet2. Enjoy :-).
+
+<b>DEPENDS ON:</b>
+
+ quicktun, bird, bash for now. it also installs some cool shit
+ that you'll use later.
+
+<b>AUTHOR:</b>
+
+ d3v11 from <a href="http://www.d3v11.ano/">www.d3v11.ano</a>, somtimes, maybe, dunno.
+
+ <b>REPORT BULLSHIT TO:</b>
+
+ <b>IRC:</b>
+
+ /relayhell/d3v11
+
+ <b>EMAIL:</b>
+
+ d3v11@d3v11.ano
+
+<b>USAGE:</b>
+
+ <b>From $RESDB_ROOT do:</b>
+
+ ./contrib/peer2anonet/peer2anonet --configure generate a new local configuration and exit
+
+ ./contrib/peer2anonet/peer2anonet --update regenerate peer configurations
+
+ ./contrib/peer2anonet/peer2anonet --configure-peer generate a new peer configuration and update
+
+ ./contrib/peer2anonet/peer2anonet --rm-peer remove a peer configuration and update
+
+ ./contrib/peer2anonet/peer2anonet --install-daemontools installs daemontools
+
+ ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp installs ucspi-tcp
+
+ ./contrib/peer2anonet/peer2anonet --install-djbdns installs djbdns
+
+ ./contrib/peer2anonet/peer2anonet --configure-dns configures dnscache and tinydns zones
+
+ ./contrib/peer2anonet/peer2anonet --update-dns updates tinydns-ano zone
+
+<b>RTFM:</b>
+
+ <b>CONFIGURE:</b>
+
+ I highly recommend that before you use peer2anonet
+ you ./configure resdb with tinydns support.
+
+ ./contrib/peer2anonet/peer2anonet --configure
+
+ <b>EXAMPLES:</b>
+
+ Enter your AnoNet subnet: 1.1.5.0
+ Enter your AnoNet router: 1.1.5.1
+ Enter your peering ip: 1.1.5.2
+ Enter your AnoNet asn: 1150
+
+ <b>CONFIGURE PEER:</b>
+
+ ./contrib/peer2anonet/peer2anonet --configure-peer
+
+ <b>KEY PAIRS:</b>
+
+ before running peer2anonet to configure peers you can use
+ quicktun to generate keypairs:
+
+ quicktun.keypair < /dev/random
+
+ <b>EXAMPLES:</b>
+
+ 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: 21150
+ Enter your local port: 61150
+ Enter your peer's asn: 1150
+ Enter your peer's public key: * see KEY PAIRS above *
+ Enter your private key: * see KEY PAIRS above *
+
+ <b>RUN CHANGES:</b>
+
+ 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.
+
+ <b>CONFIGURATION FILES:</b>
+
+ /etc/peer2anonet/peers/$PEER/* contains:
+
+ asn local_port peering_ip pubkey remote_ip remote_port run seckey
+
+ In the event you want to reconfigure a peer's tunnel you can alter the run
+ file and do `--update', rm run and modify the above files then use `--update',
+ or reconfigure the peering tunnel altogether with --configure-peer and choose
+ that peer's name. If you think this is absurd then you're probably right! I
+ plan on doing something with these files later.
+
+ <b>CONFIGURE DNS:</b>
+
+ If you did not ./configure resdb with tinydns support
+ then you need to do that before using this function.
+
+ also before using you will need to have installed
+ daemontools, djbdns, and ucspi-tcp. peer2anonet
+ can do this for you with --install-* options.
+
+ ./contrib/peer2anonet/peer2anonet --configure-dns
+
+ <b>UPDATE DNS:</b>
+
+ After a successful `--configure-dns', you can now
+ enjoy to use `--update-dns' to bring your AnoNet
+ domains up to speed.
+
+ <b>COMPLAIN:</b>
+
+ If this README doesn't tell you what you need to know
+ you can head over to www.d3v11.ano/peering. If that
+ doesn't get you what you want then either complain to
+ me or shoot both of us in the face.
+
+
+
+</pre></font></body></html>
diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet
index 10a14ff..152f4a4 100755
--- a/contrib/peer2anonet/peer2anonet
+++ b/contrib/peer2anonet/peer2anonet
@@ -21,7 +21,8 @@ USAGE(){
echo -e '\n ./contrib/peer2anonet/peer2anonet --install-daemontools installs daemontools'
echo -e '\n ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp installs ucspi-tcp'
echo -e '\n ./contrib/peer2anonet/peer2anonet --install-djbdns installs djbdns'
- echo -e '\n ./contrib/peer2anonet/peer2anonet --configure-dns configures dnscache and tinydns zones\n'
+ echo -e '\n ./contrib/peer2anonet/peer2anonet --configure-dns configures dnscache and tinydns zones'
+ echo -e '\n ./contrib/peer2anonet/peer2anonet --update-dns updates tinydns-ano zone\n'
exit 0
}
@@ -82,13 +83,23 @@ UPDATE(){
exit 1
fi
- if [ -e /etc/peer2anonet/peers/"$PEER"/port ]; then
- if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/port`) == 'X' ]]; then
- echo " fatal error: /etc/peer2anonet/peers/$PEER/port is void"
+ if [ -e /etc/peer2anonet/peers/"$PEER"/remote_port ]; then
+ if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/remote_port`) == 'X' ]]; then
+ echo " fatal error: /etc/peer2anonet/peers/$PEER/remote_port is void"
exit 1
fi
else
- echo " fatal error: /etc/peer2anonet/peers/$PEER/port not exists"
+ echo " fatal error: /etc/peer2anonet/peers/$PEER/remote_port not exists"
+ exit 1
+ fi
+
+ if [ -e /etc/peer2anonet/peers/"$PEER"/local_port ]; then
+ if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/local_port`) == 'X' ]]; then
+ echo " fatal error: /etc/peer2anonet/peers/$PEER/local_port is void"
+ exit 1
+ fi
+ else
+ echo " fatal error: /etc/peer2anonet/peers/$PEER/local_port not exists"
exit 1
fi
@@ -184,7 +195,8 @@ protocol direct direct_AnoNet_routes { table AnoNet_routes;
mkdir -p /services/"$PEER"
REMOTEIP=`cat /etc/peer2anonet/peers/"$PEER"/remote_ip`
PEERIP=`cat /etc/peer2anonet/peers/"$PEER"/peering_ip`
- PEERPORT=`cat /etc/peer2anonet/peers/"$PEER"/port`
+ PEERPORT=`cat /etc/peer2anonet/peers/"$PEER"/remote_port`
+ LOCALPORT=`cat /etc/peer2anonet/peers/"$PEER"/local_port`
PEERASN=`cat /etc/peer2anonet/peers/"$PEER"/asn`
PUBKEY=`cat /etc/peer2anonet/peers/"$PEER"/pubkey`
SECKEY=`cat /etc/peer2anonet/peers/"$PEER"/seckey`
@@ -213,7 +225,7 @@ protocol bgp $PEER { table AnoNet_routes;
export REMOTE_ADDRESS=$REMOTEIP
export REMOTE_PORT=$PEERPORT
-export LOCAL_PORT=20${PEERASN:0:4}
+export LOCAL_PORT=$LOCALPORT
export PRIVATE_KEY=$SECKEY
export PUBLIC_KEY=$PUBKEY
export TUN_MODE=1
@@ -262,6 +274,7 @@ CONFIGURE_PEER(){
read -p " Enter your peer's remote ip: " REMOTEIP
read -p " Enter your peer's peering ip: " PEERIP
read -p " Enter your peer's remote port: " PEERPORT
+ read -p " Enter your local port: " LOCALPORT
read -p " Enter your peer's asn: " PEERASN
read -p " Enter your peer's public key: " PUBKEY
read -p " Enter your private key: " SECKEY
@@ -269,7 +282,8 @@ CONFIGURE_PEER(){
mkdir -p /etc/peer2anonet/peers/"$PEER"
echo $REMOTEIP >/etc/peer2anonet/peers/"$PEER"/remote_ip
echo $PEERIP >/etc/peer2anonet/peers/"$PEER"/peering_ip
- echo $PEERPORT >/etc/peer2anonet/peers/"$PEER"/port
+ echo $PEERPORT >/etc/peer2anonet/peers/"$PEER"/remote_port
+ echo $LOCALPORT >/etc/peer2anonet/peers/"$PEER"/local_port
echo $PEERASN >/etc/peer2anonet/peers/"$PEER"/asn
echo $PUBKEY >/etc/peer2anonet/peers/"$PEER"/pubkey
echo $SECKEY >/etc/peer2anonet/peers/"$PEER"/seckey
@@ -386,9 +400,13 @@ CONFIGURE_DNS(){
tar cf /etc/peer2anonet/tinydns-root.tar tinydns-root )
fi
- (cd /service ; svc -d dnscache tinydns tinydns-ano tinydns-root)
- (cd /service ; rm -f dnscache tinydns tinydns-ano tinydns-root)
- (cd /services ; rm -rf dnscache tinydns tinydns-ano tinydns-root)
+ (
+ cd /service
+ svc -d dnscache tinydns tinydns-ano tinydns-root
+ rm -f dnscache tinydns tinydns-ano tinydns-root
+ cd /services
+ rm -rf dnscache tinydns tinydns-ano tinydns-root
+ )
echo -e '\nCONFIGURE DNS:\n'
NICK=`cat conf/git_name`
@@ -430,22 +448,13 @@ CONFIGURE_DNS(){
tinydns-conf Gtinydns Gdnslog /services/tinydns $TINYDNS_IP
- #echo ".$NICK.ano:$TINYDNS_IP:a:259200" > /services/tinydns/root/data
- #echo "=www.$NICK.ano:$GIT_IP:86400" >> /services/tinydns/root/data
- #echo "+git.$NICK.ano:$GIT_IP:86400" >> /services/tinydns/root/data
- #echo "+$NICK.ano:$GIT_IP:86400" >> /services/tinydns/root/data
- #echo "+$TINYDNS_ANO_DOMAIN:$TINYDNS_ANO_IP:3600" >> /services/tinydns/root/data
- #echo ".1.in-addr.arpa::$TINYDNS_ANO_DOMAIN" >> /services/tinydns/root/data
- #echo ".2.in-addr.arpa::$TINYDNS_ANO_DOMAIN" >> /services/tinydns/root/data
- #echo ".ano::$TINYDNS_ANO_DOMAIN" >> /services/tinydns/root/data
- #echo ".ntwrk::$TINYDNS_ANO_DOMAIN" >> /services/tinydns/root/data
(
- cd /services/tinydns/root
- ./add-ns $NICK.ano $TINYDNS_IP
- ./add-alias $GIT_DOMAIN $GIT_IP
- ./add-alias $TINYDNS_ROOT_DOMAIN $TINYDNS_ROOT_IP
- ./add-alias $TINYDNS_ANO_DOMAIN $TINYDNS_ANO_IP
- make
+ cd /services/tinydns/root
+ ./add-ns $NICK.ano $TINYDNS_IP
+ ./add-alias $GIT_DOMAIN $GIT_IP
+ ./add-alias $TINYDNS_ROOT_DOMAIN $TINYDNS_ROOT_IP
+ ./add-alias $TINYDNS_ANO_DOMAIN $TINYDNS_ANO_IP
+ make
)
tinydns-conf Gtinydns Gdnslog /services/tinydns-root $TINYDNS_ROOT_IP
@@ -456,11 +465,66 @@ CONFIGURE_DNS(){
./scripts/nameserver_autogen/tinydns_tld_datafile > /services/tinydns-ano/root/data
( cd /services/tinydns-ano/root ; make )
- ( cd / ; ln -s /services/dnscache /service/dnscache )
- ( cd / ; ln -s /services/tinydns /service/tinydns )
- ( cd / ; ln -s /services/tinydns-ano /service/tinydns-ano )
- ( cd / ; ln -s /services/tinydns-root /service/tinydns-root )
- ( cd /service ; sleep 5 ; svc -t dnscache tinydns tinydns-ano tinydns-root )
+ (
+ cd /
+ ln -s /services/dnscache /service/dnscache
+ ln -s /services/tinydns /service/tinydns
+ ln -s /services/tinydns-ano /service/tinydns-ano
+ ln -s /services/tinydns-root /service/tinydns-root
+ cd /service ; sleep 5 ; svc -t dnscache tinydns tinydns-ano tinydns-root
+ )
+ }
+
+INSTALL_DJBDNS(){
+ echo -e '\nINSTALL DJBDNS:\n'
+ [[ $(echo X`which gcc`) == X ]] && echo ' fatal error: cannot find gcc'
+ [[ $(echo X`which gcc`) == X ]] && exit 1
+ [[ $(echo X`which make`) == X ]] && echo ' fatal error: cannot find make'
+ [[ $(echo X`which make`) == X ]] && exit 1
+ [[ $(echo X`which tcpserver`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2nonet --install-ucspi-tcp'
+ [[ $(echo X`which tcpserver`) == X ]] && exit 1
+ [[ $(echo X`which svscanboot`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2nonet --install-daemontools'
+ [[ $(echo X`which svscanboot`) == X ]] && exit 1
+ cd /usr/local/src
+ wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
+ gunzip djbdns-1.05.tar
+ tar -xf djbdns-1.05.tar
+ cd djbdns-1.05
+ echo gcc -O2 -include /usr/include/errno.h > conf-cc
+ make
+ make setup check
+ }
+
+UPDATE_DNS(){
+ if [ -e /etc/peer2anonet/p2a.conf ]; then
+ source /etc/peer2anonet/p2a.conf
+ else
+ CONFIGURE
+ exit 0
+ fi
+
+ [[ $(echo X`which tcpserver`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2nonet --install-ucspi-tcp'
+ [[ $(echo X`which tcpserver`) == X ]] && exit 1
+ [[ $(echo X`which svscanboot`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2nonet --install-daemontools'
+ [[ $(echo X`which svscanboot`) == X ]] && exit 1
+
+ if [ -e /services/tinydns-ano ]; then
+ (
+ cd /services
+ echo "creating /etc/peer2anonet/tinydns-ano.tar backup"
+ tar cf /etc/peer2anonet/tinydns-ano.tar tinydns-ano
+ )
+ fi
+
+ echo -e '\nUPDATE DNS:\n'
+ ./scripts/nameserver_autogen/tinydns_tld_datafile > /services/tinydns-ano/root/data
+ ( cd /services/tinydns-ano/root ; make )
+
+ (
+ cd /service
+ sleep 5
+ svc -t dnscache tinydns tinydns-ano tinydns-root
+ )
}
@@ -482,6 +546,8 @@ elif [ "$1" == '--install-djbdns' ]; then
INSTALL_DJBDNS
elif [ "$1" == '--configure-dns' ]; then
CONFIGURE_DNS
+elif [ "$1" == '--update-dns' ]; then
+ UPDATE_DNS
else
USAGE
fi
diff --git a/db/dom/ano/demontrox/ns/a.ns.demontrox.ano b/db/dom/ano/demontrox/ns/a.ns.demontrox.ano
index 8b13789..2b67013 100644
--- a/db/dom/ano/demontrox/ns/a.ns.demontrox.ano
+++ b/db/dom/ano/demontrox/ns/a.ns.demontrox.ano
@@ -1 +1 @@
-
+1.1.9.153
diff --git a/db/dom/ano/demontrox/ns/1.1.9.153 b/db/dom/ano/gunsuit/ns/a.ns.d3v11.ano
index 8b13789..8b13789 100644
--- a/db/dom/ano/demontrox/ns/1.1.9.153
+++ b/db/dom/ano/gunsuit/ns/a.ns.d3v11.ano
diff --git a/db/dom/ano/gunsuit/owner b/db/dom/ano/gunsuit/owner
new file mode 100644
index 0000000..ca4bab5
--- /dev/null
+++ b/db/dom/ano/gunsuit/owner
@@ -0,0 +1 @@
+d3v11
diff --git a/db/udpmsg4/GunSuit/@/.gitignore b/db/udpmsg4/GunSuit/@/.gitignore
new file mode 100644
index 0000000..b19a917
--- /dev/null
+++ b/db/udpmsg4/GunSuit/@/.gitignore
@@ -0,0 +1 @@
+temp.keys
diff --git a/db/udpmsg4/GunSuit/@/default.key b/db/udpmsg4/GunSuit/@/default.key
new file mode 100644
index 0000000..d1ec9f1
--- /dev/null
+++ b/db/udpmsg4/GunSuit/@/default.key
@@ -0,0 +1 @@
+f24d566c98a4b470bb87260d8d859099a0897cc6ce7c384805bbc3f39017f24a
diff --git a/db/udpmsg4/GunSuit/@/owner b/db/udpmsg4/GunSuit/@/owner
new file mode 100644
index 0000000..ca4bab5
--- /dev/null
+++ b/db/udpmsg4/GunSuit/@/owner
@@ -0,0 +1 @@
+d3v11
diff --git a/db/udpmsg4/GunSuit/@/path b/db/udpmsg4/GunSuit/@/path
new file mode 100644
index 0000000..6c36874
--- /dev/null
+++ b/db/udpmsg4/GunSuit/@/path
@@ -0,0 +1 @@
+/GunSuit