-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'cjdelisle/crashey'
- Loading branch information
Showing
12 changed files
with
132 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Запуск cjdns не от имени суперпользователя | ||
========================================== | ||
|
||
Есть два способа запуска cjdns не от имени суперпользователя. Они могут вам пригодится, если вы хотите запустить cjdns на OpenVZ, | ||
или запустить сеть от имени обычного пользователя. | ||
|
||
Метод 1: Преждевременно настроить интерфейс tun (нужно для OpenVZ) | ||
--------------------------------------------------------------------- | ||
|
||
Если вы используйте VPS на базе OpenVZ, вам нужно использовать этот метод, | ||
так как OpenVZ запрещает постоянные туннели. | ||
|
||
Создать пользователя cjdns: | ||
|
||
sudo useradd cjdns | ||
|
||
Создать новый интерфейс TUN и разрешить cjdns к нему обращаться: | ||
|
||
sudo /sbin/ip tuntap add mode tun user cjdns dev cjdroute0 | ||
|
||
|
||
### 4b-1: Настройка интерфейса вручную | ||
|
||
Запустите команды ниже для подготовки вашего устройства TUN. | ||
|
||
sudo /sbin/ip addr add <your ipv6 address>/8 dev cjdroute0 | ||
sudo /sbin/ip link set mtu 1312 dev cjdroute0 | ||
sudo /sbin/ip link set cjdroute0 up | ||
|
||
Эти команды следует выполнять с root-привилегиями каждый раз при перезапуске системы. | ||
Вы можете разместить их в /etc/rc.local, если ваша система его поддерживает. | ||
|
||
#### Старые версии iproute2 | ||
|
||
Если при запуске /sbin/ip вы ввидите ошибку, версия iproute2 может быть устаревшей. | ||
|
||
sudo /sbin/ip tuntap add mode tun user cjdns | ||
Object "tuntap" is unknown, try "ip help". | ||
|
||
Исправление: На данный момент, следует скопировать новую | ||
версию исполняемого файла ip в вашу домашнюю директорию. | ||
Заменять системные файлы - не самая лучшая идея. | ||
|
||
### 4b-2: Запуск! | ||
|
||
sudo -u cjdns ./cjdroute < cjdroute.conf | ||
|
||
Чтобы удалить туннель, используйте следующую команду: | ||
|
||
sudo /sbin/ip tuntap del mode tun <имя туннеля> | ||
|
||
Метод 2: Дать исполняемому файлу cjdroute полномочия для создания устройства TUN. | ||
--------------------------------------------------------------------------------- | ||
|
||
Запустите эту команду с root-правами после сборки (и каждый раз при пересборке) | ||
|
||
setcap "cap_net_admin+eip cap_net_raw+eip" cjdroute | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters