Add vtun page

pull/401/head
Igor Zalatov 2024-08-24 23:00:19 +03:00
parent 4aeae18ee0
commit 55338d1e0f
1 changed files with 97 additions and 0 deletions

97
en/package-vtun.md 100644
View File

@ -0,0 +1,97 @@
# OpenIPC Wiki
[Table of Content](../README.md)
Package Vtun
------------
### Example of vtun compilation for server
```
#!/bin/bash
#
# OpenIPC.org | v.20240824
#
LANG=C
vtun_version="3.0.2"
vtun_download="http://prdownloads.sourceforge.net/vtun/vtun-${vtun_version}.tar.gz"
prepare() {
curl -L -o vtun-${vtun_version}.tar.gz ${vtun_download}
tar xvfz vtun-${vtun_version}.tar.gz
rm vtun-${vtun_version}.tar.gz
cd vtun-${vtun_version}
}
compile() {
./configure --build=x86_64-linux-gnu --disable-lzo --disable-zlib --disable-ssl --prefix=''
make && strip vtund
}
install() {
mkdir -p ../_binary
mv -v vtund ../_binary/vtund_i386
cd -
rm -rf vtun-${vtun_version}
}
prepare && compile && install
```
### Example of vtun config for server
```
options {
syslog daemon;
timeout 60;
ip /bin/ip;
}
default {
type tun;
proto tcp;
persist yes;
keepalive yes;
timeout 60;
compress no;
encrypt no;
speed 512:512;
multi killold;
}
#
### Cam-1
#
E60BFB000001 {
type ether;
speed 0:0;
password bla-bla-pass;
device v-E60BFB000001;
up {
ip "link set %% up multicast off mtu 1500";
program "brctl addif br-openipc %%";
};
down {
program "brctl delif br-openipc %%";
ip "link set %% down";
};
}
#
### Cam-2
#
729051000001 {
type ether;
speed 0:0;
password bla-bla-pass;
device v-729051000001;
up {
ip "link set %% up multicast off mtu 1500";
program "brctl addif br-openipc %%";
};
down {
program "brctl delif br-openipc %%";
ip "link set %% down";
};
}
#
```