[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 02/07: TNG: Added script running miniupnpd on a router node for
From: |
gnunet |
Subject: |
[gnunet] 02/07: TNG: Added script running miniupnpd on a router node for the nat upnp test case. |
Date: |
Wed, 18 Jan 2023 10:50:54 +0100 |
This is an automated email from the git hooks/post-receive script.
t3sserakt pushed a commit to branch master
in repository gnunet.
commit 369d046c3f2cda651b16498fc3b646338d15c170
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Wed Jan 18 09:54:24 2023 +0100
TNG: Added script running miniupnpd on a router node for the nat upnp test
case.
---
src/transport/upnp.sh | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/transport/upnp.sh b/src/transport/upnp.sh
new file mode 100755
index 000000000..d01a1a1a1
--- /dev/null
+++ b/src/transport/upnp.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if [ $2 -eq 1 ]
+then
+ if [ ! -d /tmp/netjail_scripts ]
+ then
+ mkdir /tmp/netjail_scripts
+ fi
+
+ ext_ifname=$(ip addr |grep UP|grep "@"|awk -F: '{printf $2"\n"}'|tr -d "
"|awk -F@ '{printf $1" "}'|awk '{printf $1}')
+ listening_ip=$(ip addr |grep UP|grep "@"|awk -F: '{printf $2"\n"}'|tr -d
" "|awk -F@ '{printf $1" "}'|awk '{printf $2}')
+ uuid=$(uuidgen)
+ cat miniupnpd.conf |sed
's/#ext_ifname=eth1/ext_ifname='$ext_ifname'/g'|sed
's/#listening_ip=eth0/listening_ip='$listening_ip'/g'|sed
's/uuid=73a9cb68-a00b-4d2c-8412-75fc989f0c6/uuid='$uuid'/g'|grep -v "^#"|grep
-v '^$' > /tmp/netjail_scripts/gargoyle.txt
+ miniupnpd -d -f /tmp/netjail_scripts/gargoyle.txt -P
/tmp/netjail_scripts/miniupnpd_$1.pid &
+else
+ kill $(cat /tmp/netjail_scripts/miniupnpd_$1.pid)
+fi
+
+
+
+
+
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (6b56928ab -> de50c9a2d), gnunet, 2023/01/18
- [gnunet] 04/07: TNG: miniupnpd only works with public IP addresses., gnunet, 2023/01/18
- [gnunet] 02/07: TNG: Added script running miniupnpd on a router node for the nat upnp test case.,
gnunet <=
- [gnunet] 01/07: TNG: Added topology file for nat upnp test case., gnunet, 2023/01/18
- [gnunet] 05/07: TNG: Changed the format of the interface names to make miniupnpd happy., gnunet, 2023/01/18
- [gnunet] 06/07: TNG: Cleanup after scripts which were running on netjail nodes., gnunet, 2023/01/18
- [gnunet] 07/07: Merge branch 'master' of ssh://git.gnunet.org/gnunet, gnunet, 2023/01/18
- [gnunet] 03/07: TNG: Handing over the global number of the router node to the script running on that node., gnunet, 2023/01/18