{"action":"created","issue":{"url":"https://api.github.com/repos/sudomesh/tunneldigger-lab/issues/5","repository_url":"https://api.github.com/repos/sudomesh/tunneldigger-lab","labels_url":"https://api.github.com/repos/sudomesh/tunneldigger-lab/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/sudomesh/tunneldigger-lab/issues/5/comments","events_url":"https://api.github.com/repos/sudomesh/tunneldigger-lab/issues/5/events","html_url":"https://github.com/sudomesh/tunneldigger-lab/issues/5","id":302114064,"number":5,"title":"Tunneldigger/Exitnode Labs Notes","user":{"login":"aetilley","id":9160272,"avatar_url":"https://avatars3.githubusercontent.com/u/9160272?v=4","gravatar_id":"","url":"https://api.github.com/users/aetilley","html_url":"https://github.com/aetilley","followers_url":"https://api.github.com/users/aetilley/followers","following_url":"https://api.github.com/users/aetilley/following{/other_user}","gists_url":"https://api.github.com/users/aetilley/gists{/gist_id}","starred_url":"https://api.github.com/users/aetilley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aetilley/subscriptions","organizations_url":"https://api.github.com/users/aetilley/orgs","repos_url":"https://api.github.com/users/aetilley/repos","events_url":"https://api.github.com/users/aetilley/events{/privacy}","received_events_url":"https://api.github.com/users/aetilley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-04T19:32:27Z","updated_at":"2018-03-08T23:25:04Z","closed_at":null,"author_association":"NONE","body":"Beginning with Tunneldigger Lab\r\n\r\nLocal workstation: Linux (jessie) virtual machine.\r\n\r\n**Prerequisites:**\r\n\r\nAll successful except last which gives:\r\n\r\nE: Unable to locate package linux-image-extra-3.16.0-4-amd64\r\nE: Couldn't find any package by regex 'linux-image-extra-3.16.0-4-amd64'\r\n\r\n\r\nMoving on...\r\n\r\n**Install:**\r\n\r\nAll three kernel modules loaded successfully:\r\n\r\nvagrant@jessie:~$ sudo lsmod | grep l2tp\r\nl2tp_eth               12851  0 \r\nl2tp_netlink           17323  1 l2tp_eth\r\nl2tp_core              25973  2 l2tp_eth,l2tp_netlink\r\n\r\n(Also added these three to /etc/modules.)\r\n\r\n\r\n**Clone:**\r\nSuccessfully cloned repo.  Successfully cmade and made the client code.\r\n\r\n\r\n**Digging a tunnel:**\r\n\r\nChecking prior state:\r\n\r\n1)\r\n\r\nvagrant@jessie:~/tunneldigger/client$ ip addr\r\n1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default \r\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\r\n    inet 127.0.0.1/8 scope host lo\r\n       valid_lft forever preferred_lft forever\r\n    inet6 ::1/128 scope host \r\n       valid_lft forever preferred_lft forever\r\n2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\r\n    link/ether 08:00:27:ba:0e:69 brd ff:ff:ff:ff:ff:ff\r\n    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0\r\n       valid_lft forever preferred_lft forever\r\n    inet6 fe80::a00:27ff:feba:e69/64 scope link \r\n       valid_lft forever preferred_lft forever\r\n\r\n2) \r\nvagrant@jessie:~/tunneldigger/client$ netstat -u\r\nActive Internet connections (w/o servers)\r\nProto Recv-Q Send-Q Local Address           Foreign Address         State\r\n\r\n\r\n3)\r\n cat /var/log/syslog | grep td-client return some things from (I believe) a previous attempt (which strangely have timestamps in the future).  When called at about Mar 4 10:30 am it returns:\r\n\r\n...\r\n...\r\nMar  4 18:27:32 jessie td-client: Performing broker selection...\r\nMar  4 18:27:43 jessie td-client: No suitable brokers found. Retrying in 5 seconds\r\nMar  4 18:27:48 jessie td-client: Performing broker selection...\r\nMar  4 18:27:59 jessie td-client: No suitable brokers found. Retrying in 5 seconds\r\nMar  4 18:28:04 jessie td-client: Performing broker selection...\r\nMar  4 18:28:10 jessie td-client: Got termination signal, shutting down tunnel...\r\n\r\nMoving on...\r\n\r\n**Digging a tunnel:**\r\n\r\nvagrant@jessie:~/tunneldigger/client$ sudo ./tunneldigger -b exit.sudomesh.org:8942 -u 07105c7f-681f-4476-b5aa-5146c6e579de -i l2tp0 -s ./tunnel_hook_ex.sh\r\nHello Tunnel!\r\n<stops and listens>\r\n\r\nI wasn't sure what the point of the tunnel hook script was at this point, so I just make tunnel_hook_ex.sh echo \"Hello Tunnel!\"\r\nAlso it wasn't clear whether I should use the provided uuid or chose my own.  I picked the one provided.  Would like to know more about what role this uuid plays.\r\n\r\nChecking posterior state:\r\n\r\n1) \"inspecting the tunnel_hook.sh.log for recent entries of new sessions.\"\r\n\r\nSorry, what is this file?  The command\r\n\r\nfind / \"tunnel_hook_ex.sh.log\"\r\n\r\nDid not find anything.\r\n\r\n2)\r\nvagrant@jessie:/$ ip addr\r\n1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default \r\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\r\n    inet 127.0.0.1/8 scope host lo\r\n       valid_lft forever preferred_lft forever\r\n    inet6 ::1/128 scope host \r\n       valid_lft forever preferred_lft forever\r\n2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\r\n    link/ether 08:00:27:ba:0e:69 brd ff:ff:ff:ff:ff:ff\r\n    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0\r\n       valid_lft forever preferred_lft forever\r\n    inet6 fe80::a00:27ff:feba:e69/64 scope link \r\n       valid_lft forever preferred_lft forever\r\n6: l2tp0: <BROADCAST,MULTICAST> mtu 1446 qdisc noop state DOWN group default qlen 1000\r\n    link/ether ba:c1:7a:d1:64:6b brd ff:ff:ff:ff:ff:ff\r\n\r\n\r\n3) \r\nvagrant@jessie:/$ netstat -u \r\nActive Internet connections (w/o servers)\r\nProto Recv-Q Send-Q Local Address           Foreign Address         State      \r\nudp        0      0 10.0.2.15:34812         unassigned.psychz.:8942 ESTABLISHED\r\n\r\n4)\r\nvagrant@jessie:/$ sudo cat /var/log/syslog | grep td-client\r\n...\r\n...\r\nMar  4 18:58:04 jessie td-client: Performing broker selection...\r\nMar  4 18:58:05 jessie td-client: Broker usage of exit.sudomesh.org:8942: 1535\r\nMar  4 18:58:05 jessie td-client: Selected exit.sudomesh.org:8942 as the best broker.\r\nMar  4 18:58:06 jessie td-client: Tunnel successfully established.\r\nMar  4 18:58:23 jessie td-client: Setting MTU to 1446\r\nMar  4 18:58:26 jessie td-client: Setting MTU to 1446\r\nMar  4 18:59:08 jessie td-client: Got termination signal, shutting down tunnel...\r\nMar  4 19:12:42 jessie td-client: Performing broker selection...\r\nMar  4 19:12:43 jessie td-client: Broker usage of exit.sudomesh.org:8942: 1535\r\nMar  4 19:12:43 jessie td-client: Selected exit.sudomesh.org:8942 as the best broker.\r\nMar  4 19:12:44 jessie td-client: Tunnel successfully established.\r\nMar  4 19:13:03 jessie td-client: Setting MTU to 1446\r\nMar  4 19:13:04 jessie td-client: Setting MTU to 1446\r\n\r\n\r\n**Setting up a broker**\r\n\r\n(On a new D.O. droplet)\r\n\r\nssh root@159.89.227.146\r\n\r\nAll of the following was successful\r\n\r\nsudo apt update\r\nsudo apt install iproute bridge-utils libnetfilter-conntrack-dev libnfnetlink-dev libffi-dev python-dev libevent-dev ebtables python-virtualenv\r\nmkdir /srv/tunneldigger\r\ncd /srv/tunneldigger\r\nvirtualenv env_tunneldigger\r\ngit clone https://github.com/wlanslovenija/tunneldigger.git\r\nsource env_tunneldigger/bin/activate\r\ncd tunneldigger/broker\r\npython setup.py install\r\ncp l2tp_broker.cfg.example l2tp_broker.cfg\r\n\r\nAlso changed l2tp_broker.cfg to begin with \r\n\r\n[broker]\r\n; IP address the broker will listen and accept tunnels on                                      \r\naddress=159.89.227.146\r\n; Ports where the broker will listen on                                                        \r\nport=53,123,8942\r\n; Interface with that IP address                                                               \r\ninterface=eth0\r\n\r\nNow to starting the broker:\r\n\r\n\r\n(env_tunneldigger) root@mesh-droplet-1:/# cd /\r\n(env_tunneldigger) root@mesh-droplet-1:/# sudo /srv/tunneldigger/env_tunneldigger/bin/python -m tunneldigger_broker.main /srv/tunneldigger/tunneldigger/broker/l2tp_broker.cfg\r\n[INFO/tunneldigger.broker] Initializing the tunneldigger broker.\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/runpy.py\", line 174, in _run_module_as_main\r\n    \"__main__\", fname, loader, pkg_name)\r\n  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\r\n    exec code in run_globals\r\n  File \"/srv/tunneldigger/env_tunneldigger/lib/python2.7/site-packages/tunneldigger_broker-0.3.0-py2.7-linux-x86_64.egg/tunneldigger_broker/main.py\", line 84, in <module>\r\n    tunnel_manager.initialize()\r\n  File \"/srv/tunneldigger/env_tunneldigger/local/lib/python2.7/site-packages/tunneldigger_broker-0.3.0-py2.7-linux-x86_64.egg/tunneldigger_broker/broker.py\", line 192, in initialize\r\n    self.netlink = l2tp.NetlinkInterface()\r\n  File \"/srv/tunneldigger/env_tunneldigger/local/lib/python2.7/site-packages/tunneldigger_broker-0.3.0-py2.7-linux-x86_64.egg/tunneldigger_broker/l2tp.py\", line 78, in __init__\r\n    raise L2TPSupportUnavailable\r\ntunneldigger_broker.l2tp.L2TPSupportUnavailable\r\n\r\nTried deactivating the python env and running again, but I get the same error.\r\n\r\n**\r\nNOTE:  Realizing that the order of operations in the two labs is not sequential, but one might have to jump back and forth between them.   Continuing to experiment with this.\r\n**\r\n\r\n**Exit node repo:  Install**\r\nCloned and ran script\r\n\r\nssh root@159.89.227.146 'bash -s' < create_exitnode.sh 159.89.227.146\r\n\r\napparently successfully.\r\n\r\n**Exit node repo:  Testing Tunnel Digger**\r\n\r\n*step 1.* create tunnel using tunneldigger client (see https://github.com/sudomesh/tunneldigger-lab)\r\n\r\nvagrant@jessie:~/tunneldigger/client$ sudo ./tunneldigger -b 159.89.227.146:8942 -u 07105c7f-681f-4476-b5aa-5146c6e579de -i l2tp0 -s ./tunnel_hook_ex.sh\r\n<appears to wait an listen>\r\n\r\nAgain, using the same uuid since I'm not sure of the role of this.\r\n\r\n\r\n*step 2.* assign some ip to tunneldigger client interface\r\n\r\n(After accidentally running ip addr while not in my linux virtual machine)\r\n\r\nvagrant@jessie:~$ ip addr\r\n...\r\n7: l2tp0: <BROADCAST,MULTICAST> mtu 1446 qdisc noop state DOWN group default qlen 1000\r\n    link/ether ee:17:25:5e:66:0d brd ff:ff:ff:ff:ff:ff\r\n\r\nvagrant@jessie:~$ sudo ip addr add 100.65.26.1 dev l2tp0\r\n\r\nvagrant@jessie:~$ ip addr\r\n...\r\n7: l2tp0: <BROADCAST,MULTICAST> mtu 1446 qdisc noop state DOWN group default qlen 1000\r\n    link/ether ee:17:25:5e:66:0d brd ff:ff:ff:ff:ff:ff\r\n    inet 100.65.26.1/32 scope global l2tp0\r\n       valid_lft forever preferred_lft forever\r\n\r\n\r\n*step 3.* establish static route from client to tunneldigger broker\r\n\r\nvagrant@jessie:~$ sudo ip r add 100.64.0.42 dev l2tp0\r\nRTNETLINK answers: Network is down\r\n\r\n\r\n*step 4.*  establish static route from tunneldigger broker to client\r\nroot@mesh-droplet-1:~# sudo ip r add 100.65.26.1 dev l2tp2431\r\n (appears successful)\r\n\r\n\r\n**make sure to up the interface**\r\nvagrant@jessie:~$ sudo ip link set l2tp0 up\r\n\r\nvagrant@jessie:~$ ping -I l2tp0 100.64.0.42\r\nPING 100.64.0.42 (100.64.0.42) from 100.65.26.1 l2tp0: 56(84) bytes of data.\r\n64 bytes from 100.64.0.42: icmp_seq=1 ttl=64 time=171 ms\r\n64 bytes from 100.64.0.42: icmp_seq=2 ttl=64 time=104 ms\r\n64 bytes from 100.64.0.42: icmp_seq=3 ttl=64 time=87.8 ms\r\n64 bytes from 100.64.0.42: icmp_seq=4 ttl=64 time=82.7 ms\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sudomesh/tunneldigger-lab/issues/comments/371659976","html_url":"https://github.com/sudomesh/tunneldigger-lab/issues/5#issuecomment-371659976","issue_url":"https://api.github.com/repos/sudomesh/tunneldigger-lab/issues/5","id":371659976,"user":{"login":"cambers","id":13529844,"avatar_url":"https://avatars2.githubusercontent.com/u/13529844?v=4","gravatar_id":"","url":"https://api.github.com/users/cambers","html_url":"https://github.com/cambers","followers_url":"https://api.github.com/users/cambers/followers","following_url":"https://api.github.com/users/cambers/following{/other_user}","gists_url":"https://api.github.com/users/cambers/gists{/gist_id}","starred_url":"https://api.github.com/users/cambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cambers/subscriptions","organizations_url":"https://api.github.com/users/cambers/orgs","repos_url":"https://api.github.com/users/cambers/repos","events_url":"https://api.github.com/users/cambers/events{/privacy}","received_events_url":"https://api.github.com/users/cambers/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T23:25:04Z","updated_at":"2018-03-08T23:25:04Z","author_association":"NONE","body":"I am not able to ping the exitnode unless I assign it a static ip:\r\nroot@exitnode:~# ip addr add 100.64.0.42 dev l2tp101-101\r\n\r\nThis means that as I continue with the lab below, I am still able to ping 100.64.0.42 even after step 5 and 6.\r\n???\r\n\r\nTesting Routing with Babeld Through Tunnel Digger\r\n.........\r\nStep 3. check routes After running ip route you should see entries like:\r\n100.64.0.42 via 100.64.0.42 dev l2tp0  proto babel onlink \r\n\r\nStep 4. ping the mesh routing ip Now, execute ping 100.64.0.42 and you should see something like:\r\n$ ping 100.64.0.42\r\nPING 100.64.0.42 (100.64.0.42) 56(84) bytes of data.\r\n64 bytes from 100.64.0.42: icmp_seq=1 ttl=64 time=207 ms\r\n64 bytes from 100.64.0.42: icmp_seq=2 ttl=64 time=204 ms\r\n\r\nStep 5. now, stop the babeld process using ctrl-c\r\n\r\nStep 6. repeat steps 3/4 and confirm that the routes are gone and the ping no longer succeeds."}}
{"actor":{"display_login":"cambers"}}