mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
update n2n
This commit is contained in:
parent
1ccc43514c
commit
ff937c77a4
@ -7,7 +7,7 @@ MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
&& apt update \
|
||||
&& apt install -y gnupg lsb-release net-tools wget \
|
||||
&& apt install -y gnupg iptables lsb-release net-tools wget \
|
||||
&& wget http://apt.ntop.org/stretch/all/apt-ntop.deb \
|
||||
&& dpkg -i apt-ntop.deb \
|
||||
&& apt update \
|
||||
|
@ -5,13 +5,34 @@ n2n
|
||||
users to exploit features typical of P2P applications at network instead of
|
||||
application level.
|
||||
|
||||
## up and running
|
||||
```
|
||||
.............VPN................
|
||||
+------LAN-+-----+ +- Edge.
|
||||
| . | / .
|
||||
| Client ->.Edge +-> Supernode <-+- Edge .
|
||||
| . | \ .
|
||||
+----------+-----+ +- Edge.
|
||||
................................
|
||||
```
|
||||
|
||||
## Supernode (1.2.3.4)
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
$ docker-compose up -d supernode
|
||||
```
|
||||
|
||||
$ docker-compose exec edge bash
|
||||
>>> ping 192.168.100.1
|
||||
## Edge (192.168.1.23)
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d edge
|
||||
$ sysctl -w net.ipv4.ip_forward=1
|
||||
$ iptables -t nat -A POSTROUTING -o n2n0 -j MASQUERADE
|
||||
```
|
||||
|
||||
## Client (192.168.1.45)
|
||||
|
||||
```bash
|
||||
$ ip route add 192.168.100.0/24 via 192.168.1.23
|
||||
```
|
||||
|
||||
[1]: https://www.ntop.org/products/n2n/
|
||||
|
@ -7,7 +7,7 @@ MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
&& apt update \
|
||||
&& apt install -y gnupg lsb-release net-tools wget \
|
||||
&& apt install -y gnupg iptables lsb-release net-tools wget \
|
||||
&& wget -qO- http://packages.ntop.org/apt/ntop.key | apt-key add - \
|
||||
&& { \
|
||||
echo "deb http://apt.ntop.org/stretch_pi armhf/"; \
|
||||
|
@ -1,7 +1,7 @@
|
||||
edge:
|
||||
image: easypi/n2n-arm
|
||||
entrypoint: ["edge"]
|
||||
command: ["-dn2n0", "-cmynetwork", "-kmypassword", "-mAA:BB:CC:DD:EE:FF", "-a192.168.100.1", "-p50001", "-lsupernode:7654", "-f"]
|
||||
command: ["-dn2n0", "-cmynetwork", "-kmypassword", "-mAA:BB:CC:DD:EE:FF", "-a192.168.100.1", "-p50001", "-lsupernode:7654", "-r", "-f"]
|
||||
extra_hosts:
|
||||
- supernode:1.2.3.4
|
||||
devices:
|
||||
|
@ -12,7 +12,7 @@ services:
|
||||
edge:
|
||||
image: vimagick/n2n
|
||||
entrypoint: ["edge"]
|
||||
command: ["-dn2n0", "-cmynetwork", "-kmypassword", "-mAA:BB:CC:DD:EE:FF", "-a192.168.100.1", "-p50001", "-lsupernode:7654", "-f"]
|
||||
command: ["-dn2n0", "-cmynetwork", "-kmypassword", "-mAA:BB:CC:DD:EE:FF", "-a192.168.100.1", "-p50001", "-lsupernode:7654", "-r", "-f"]
|
||||
devices:
|
||||
- /dev/net/tun
|
||||
cap_add:
|
||||
|
Loading…
Reference in New Issue
Block a user