NAT型の仮想NICで、ポートフォワーディング的なことをやる。
ホストで受けた通信をゲストに転送する。
昔はvmnetcfg.exe的なツールがバンドルされてたようですが今は無いみたいです。
Confを直接いじってOK。
[incomingtcp] 10022 = 192.168.11.129:22
この場合だと、ホストの10022番ポートを、ゲスト(192. 168.11.129)の22番ポートへ。 って意味になるらしい。
●参考
[incomingtcp] 10022 = 192.168.11.129:22
$crontab -e
MAILTO=xxxx@gmail.com 40 0 21 5 * ~/cmd.sh
$ sudo apt-get install ssmtp2、ssmtpの設定
$ sudo vi /etc/ssmtp/ssmtp.conf
# # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. #root=postmaster # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com mailhub=smtp.gmail.com:587 # Where will the mail seem to come from? #rewriteDomain= # The full hostname #hostname=raspberrypi # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address #FromLineOverride=YES AuthUser=Gmailのアカウント名 AuthPass=Gmailのパスワード AuthMethod=LOGIN UseSTARTTLS=YES UseTLS=Yes3、送信テスト
$ vi mailtest.txt
From:gmailのメールアドレス To:あて先メールアドレス Subject:test Mail Test
$ sendmail -t < mailtest.txt