0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

BastilleBSDのIPv4

Last updated at Posted at 2021-06-04

jailを作るときにIPv4のアドレスを指定するとそのアドレスがjailに設定されます。外に出るときにはホストのインターフェースがnatしてアクセスします。

BastilleIPv4.png

外から直接jailへのアクセスはできません。

BastilleBSDではホストのポートをjailのポートに転送する機能があります。

tftpのポートをホストからjailに転送してみます。

% sudo bastille rdr testjail udp 69 69

この設定は再起動しても保存されています。

inetdを有効にしてtftpdを使えるようにしてみます。tftpを有効にした/root/inetd.confを用意しておきます。

% sudo bastille sysrc testjail inetd_enable="YES"
% sudo bastille sysrc testjail inetd_flags+=" /root/inetd.conf"
% sudo bastille restart testjail

大きなファイルを転送すると結構Timeoutが発生しますが、ファイルは正常に転送できます。

ZRouterのイメージのパスをtftpのパスにしておくとu-bootからtftpでファイルが取得できるようになります。

BastilleBSDはVNETを使うこともできて、その場合はより柔軟に設定ができるものと思われますが、複雑になるので試してません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?