mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-05-13 22:06:55 +02:00
update n2n
This commit is contained in:
parent
1ccc43514c
commit
ff937c77a4
@ -7,7 +7,7 @@ MAINTAINER EasyPi Software Foundation
|
|||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& apt update \
|
&& 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 \
|
&& wget http://apt.ntop.org/stretch/all/apt-ntop.deb \
|
||||||
&& dpkg -i apt-ntop.deb \
|
&& dpkg -i apt-ntop.deb \
|
||||||
&& apt update \
|
&& apt update \
|
||||||
|
@ -5,13 +5,34 @@ n2n
|
|||||||
users to exploit features typical of P2P applications at network instead of
|
users to exploit features typical of P2P applications at network instead of
|
||||||
application level.
|
application level.
|
||||||
|
|
||||||
## up and running
|
```
|
||||||
|
.............VPN................
|
||||||
|
+------LAN-+-----+ +- Edge.
|
||||||
|
| . | / .
|
||||||
|
| Client ->.Edge +-> Supernode <-+- Edge .
|
||||||
|
| . | \ .
|
||||||
|
+----------+-----+ +- Edge.
|
||||||
|
................................
|
||||||
|
```
|
||||||
|
|
||||||
|
## Supernode (1.2.3.4)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d supernode
|
||||||
|
```
|
||||||
|
|
||||||
$ docker-compose exec edge bash
|
## Edge (192.168.1.23)
|
||||||
>>> ping 192.168.100.1
|
|
||||||
|
```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/
|
[1]: https://www.ntop.org/products/n2n/
|
||||||
|
@ -7,7 +7,7 @@ MAINTAINER EasyPi Software Foundation
|
|||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& apt update \
|
&& 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 - \
|
&& wget -qO- http://packages.ntop.org/apt/ntop.key | apt-key add - \
|
||||||
&& { \
|
&& { \
|
||||||
echo "deb http://apt.ntop.org/stretch_pi armhf/"; \
|
echo "deb http://apt.ntop.org/stretch_pi armhf/"; \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
edge:
|
edge:
|
||||||
image: easypi/n2n-arm
|
image: easypi/n2n-arm
|
||||||
entrypoint: ["edge"]
|
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:
|
extra_hosts:
|
||||||
- supernode:1.2.3.4
|
- supernode:1.2.3.4
|
||||||
devices:
|
devices:
|
||||||
|
@ -12,7 +12,7 @@ services:
|
|||||||
edge:
|
edge:
|
||||||
image: vimagick/n2n
|
image: vimagick/n2n
|
||||||
entrypoint: ["edge"]
|
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:
|
devices:
|
||||||
- /dev/net/tun
|
- /dev/net/tun
|
||||||
cap_add:
|
cap_add:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user