From 31aa0f9bb8466d43930128170a87b647c9d53dd2 Mon Sep 17 00:00:00 2001 From: d3v11 Date: Wed, 2 Nov 2011 23:34:38 -0400 Subject: Peer2AnoNet updated --- contrib/peer2anonet/peer2anonet | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 64af216..f64a07b 100644 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -136,7 +136,15 @@ mkdir -p /services/"$PEERNAME" ######################################################################### # Create files to configure the new peering session: echo "#!/bin/sh +# uncomment if your peer has a dynamic IP +# #export REMOTE_FLOAT=1 + +# uncomment for debugging. you'll need to use ./run to view output instead +# of svc -u /service/ +# +#export DEBUG=1 + export REMOTE_ADDRESS=$REMOTEIP export REMOTE_PORT=$PEERPORT export LOCAL_PORT=$ADDPORT @@ -144,6 +152,15 @@ export PRIVATE_KEY=\"\$(cat seckey)\" export PUBLIC_KEY=$PUBKEY export TUN_MODE=1 export INTERFACE=ppp-$PEERNAME + +# uncomment if you want to nuke your default gateway and configure +# routes only to peers through IcannNet. If any of your peers use +# dynamic IP's or you use Tor or i2p then this is probably NOT a +# good idea. +# +#route del default gw `ip route show | grep default | cut -d' ' -f 3` +#route add $REMOTE_ADDRESS gw `ip route show | grep default | cut -d' ' -f 3 + ( sleep 5; ip addr add $P2A_IP peer $PEERIP/32 dev \$INTERFACE scope link ip addr add $P2A_ROUTE/32 dev \$INTERFACE scope global @@ -161,8 +178,8 @@ echo 'Secret Key Goes Here!' > "/services/$PEERNAME/seckey" echo "peer2anonet: New peering session configured. Please place your secret key in: /services/$PEERNAME/seckey -To allow remote floating: -uncomment REMOTE_FLOAT=1 in /services/$PEERNAME/run" +Some additional options are available in /services/$PEERNAME/run +Please read the comments in the file for details." -- cgit v1.2.3 From 06c7e29cb8008b697463f02d693826f64643499f Mon Sep 17 00:00:00 2001 From: d3v11 Date: Thu, 3 Nov 2011 14:13:00 -0400 Subject: Peer2AnoNet updated: made changes to ./run configuration and included better documentation. --- contrib/peer2anonet/peer2anonet | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index f64a07b..2416d74 100644 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -156,10 +156,13 @@ export INTERFACE=ppp-$PEERNAME # uncomment if you want to nuke your default gateway and configure # routes only to peers through IcannNet. If any of your peers use # dynamic IP's or you use Tor or i2p then this is probably NOT a -# good idea. +# good idea. You may need to modify the DEFAULT_ROUTE code below. +# If you run into problems with this please email d3v11@d3v11.ano +# so I can create a patch. # -#route del default gw `ip route show | grep default | cut -d' ' -f 3` -#route add $REMOTE_ADDRESS gw `ip route show | grep default | cut -d' ' -f 3 +#DEFAULT_ROUTE=`ip route show | grep default | cut -d' ' -f 3` +#route del default gw $DEFAULT_ROUTE +#route add $REMOTE_ADDRESS gw $DEFAULT_ROUTE ( sleep 5; ip addr add $P2A_IP peer $PEERIP/32 dev \$INTERFACE scope link -- cgit v1.2.3 From 8ebb4c96fa73fd490aff71076da273214200d5ee Mon Sep 17 00:00:00 2001 From: d3v11 Date: Thu, 3 Nov 2011 19:35:29 -0400 Subject: Peer2AnoNet bug fixed with run script, ping hack --- contrib/peer2anonet/peer2anonet | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 2416d74..a09d42c 100644 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -168,7 +168,7 @@ export INTERFACE=ppp-$PEERNAME ip addr add $P2A_IP peer $PEERIP/32 dev \$INTERFACE scope link ip addr add $P2A_ROUTE/32 dev \$INTERFACE scope global ip link set dev \$INTERFACE up - ping -c 1 -I $INTERFACE -r -w 5 + ping -c 1 -I \$INTERFACE -r -w 5 ) & exec /usr/sbin/quicktun.nacltai" > /services/"$PEERNAME"/run chmod +x /services/"$PEERNAME"/run @@ -182,7 +182,8 @@ echo "peer2anonet: New peering session configured. Please place your secret key in: /services/$PEERNAME/seckey Some additional options are available in /services/$PEERNAME/run -Please read the comments in the file for details." +Please read the comments in the file for details. You may need to +restart the bird daemon. ie, svc -t /service/bird " -- cgit v1.2.3 From b793e8463cdaec932d3de4e52514cc2f2aeb4fc3 Mon Sep 17 00:00:00 2001 From: d3v11 Date: Thu, 3 Nov 2011 19:45:30 -0400 Subject: peer2anonet bug(s) fixed with new /service*//run configurations --- contrib/peer2anonet/peer2anonet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index a09d42c..9816304 100644 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -160,9 +160,9 @@ export INTERFACE=ppp-$PEERNAME # If you run into problems with this please email d3v11@d3v11.ano # so I can create a patch. # -#DEFAULT_ROUTE=`ip route show | grep default | cut -d' ' -f 3` -#route del default gw $DEFAULT_ROUTE -#route add $REMOTE_ADDRESS gw $DEFAULT_ROUTE +#DEFAULT_ROUTE=\`ip route show | grep default | cut -d' ' -f 3\` +#route del default gw \$DEFAULT_ROUTE +#route add \$REMOTE_ADDRESS gw \$DEFAULT_ROUTE ( sleep 5; ip addr add $P2A_IP peer $PEERIP/32 dev \$INTERFACE scope link -- cgit v1.2.3 From cd1cd5834b7c5863ac1c462df68653d2fc70b9e0 Mon Sep 17 00:00:00 2001 From: d3v11 Date: Thu, 3 Nov 2011 20:07:15 -0400 Subject: peer2anonet pinghack bug fixed --- contrib/peer2anonet/peer2anonet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 9816304..1072659 100644 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -168,7 +168,7 @@ export INTERFACE=ppp-$PEERNAME ip addr add $P2A_IP peer $PEERIP/32 dev \$INTERFACE scope link ip addr add $P2A_ROUTE/32 dev \$INTERFACE scope global ip link set dev \$INTERFACE up - ping -c 1 -I \$INTERFACE -r -w 5 + ping -c 1 -I \$INTERFACE $PEERIP -r -w 5 ) & exec /usr/sbin/quicktun.nacltai" > /services/"$PEERNAME"/run chmod +x /services/"$PEERNAME"/run -- cgit v1.2.3 From 8c4564fc4c6f9f94bd837af6ba5716d9b58c6f3a Mon Sep 17 00:00:00 2001 From: d3v11 Date: Thu, 3 Nov 2011 20:09:30 -0400 Subject: peer2anonet update --- contrib/peer2anonet/peer2anonet | 2 ++ 1 file changed, 2 insertions(+) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 1072659..4bbb164 100644 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -168,6 +168,8 @@ export INTERFACE=ppp-$PEERNAME ip addr add $P2A_IP peer $PEERIP/32 dev \$INTERFACE scope link ip addr add $P2A_ROUTE/32 dev \$INTERFACE scope global ip link set dev \$INTERFACE up +# comment the following ping line to remove pinghack. this is a +# trick used to help bird connect. ping -c 1 -I \$INTERFACE $PEERIP -r -w 5 ) & exec /usr/sbin/quicktun.nacltai" > /services/"$PEERNAME"/run -- cgit v1.2.3