FreeBSD: IPv6 в тюрьмах (ezjail)

Вот и все. Входные данные (тестовый файл):

RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....

RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....

RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....

Код:

awk '{print $ 0> "file" NR}' RS = '\ n \ n' testfile

Замените "file" на имя нужных файлов. иметь. В этом примере у вас будет:

$ cat file1
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....

$ cat file2
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....

$ cat file3
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
1
13.03.2015, 12:42
1 ответ

в сервере rc.conf это:

ifconfig_re0_ipv6="inet6 accept_rtadv"

(Вы можете добавить статический ipv6 адрес, если хотите). В моем окружении мой маршрутизатор раздает адреса IPv6 другим системам.

ifconfig на самом сервере:

re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
This is the server ip config
         ether 22:22:22:22:22:22
         inet6 fe80::1ae1:b1ff:fe11:1234%re0 prefixlen 64 scopeid 0x1
         inet 172.16.0.200 netmask 0xffffffff broadcast 172.16.0.200
         inet6 2001:123:4567:0:1234:1234:1234:1234 prefixlen 64 autoconf
         inet 172.16.0.20 netmask 0xffffff00 broadcast 172.16.0.255
         nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active

Теперь настройте в: /usr/local/etc/ezjail/anysystem:

export jail_proxy_ip="172.16.0.200,2001:123:1234:0:1234:1234:1234:1234"

(без пробела после запятой)

Перезапустите этот джейл, зайдите в консоль джейла и запустите ifconfig. Вы увидите один ipv4 и один ipv6 адрес.

uname -a:
FreeBSD 10.2-RELEASE r286666

Я протестировал это с squid jail и все работает нормально.

1
27.01.2020, 23:50

Теги

Похожие вопросы