【Powershell】AWS S3にファイルバックアップするスクリプトを作る

イメージ
AWSに関して Web上の事例はLinuxばかりでWindowsの事例が少ない気がする! (※個人の感想です) あと、AWSではないが、 クラウドサービスでよくある「S3互換のストレージ」に関して 使いかたがわからん!!!! AWSでは「AWS Tools for Windows PowerShell」があるけど、そのS3互換のストレージでは何使えばいいんや・・・ ナレッジやら事例をもっとあげてください。どことは言わないけど。。

NetScaler VPX + XenDesktop 環境の構築をしてみる phase 1 【vyos(仮想ルータ編】


続きです。

本環境におけるvyos(ルータ)を設定します。
なお、vyosのインストールは「VyOS 1.1.0(beta1)をインストールしてみる」を参照ください。
phase 0 概要編
phase 1 vyos(仮想ルータ)編 ←いまここ
phase 2 XenDesktop環境編
phase 3 NetScaler編


本環境Network図


1.初期設定
①rootユーザ設定(rootパスワード:Password)
[edit]
#set system login user root authentication plaintext-password Password
#commit

②キーボード設定
#vi /etc/default/keyboard

・変更前
8  XKBMODEL="pc105"
9  XKBLAYOUT="us"

・変更後
8  XKBMODEL="pc106"
9  XKBLAYOUT="jp"

③タイムゾーン設定
[edit]
#set system time-zone Asia/Tokyo
#commit

④SSH有効化
[edit]
#set service ssh port 22
#set service ssh listen-address 192.168.2.150
#commit

⑤保存&リブート
[edit]
#save
#exit
#reboot

2.NW設定
①IPアドレス設定(eth0,eth1,eth2)
[edit]
#set interface ethrnet eth0 address 192.168.2.150/24
#set interface ethrnet eth0 address 192.168.2.151/24
#set interface ethrnet eth0 address 192.168.2.155/24
#set interface ethrnet eth1 address 10.1.1.1/24
#set interface ethrnet eth2 address 172.26.1.1/24
#commit

②ホスト名、デフォルトゲートウェイ、DNS(フォーワーディング)設定
[edit]
#set system host-name VY01.vip.local
#set system gate way-address 192.168.2.1
#set service dns forwarding cache-size 10000
#set service dns forwarding listen-on eth1
#set service dns forwarding name-server 192.168.2.1


③スタティックルート
[edit]
#set protocols static route 10.1.1.0/24 next-hop 10.1.1.1
#set protocols static route 172.26.1.0/24 next-hop 172.26.1.1
#set protocols static route 192.168.2.0/24 next-hop 192.168.2.151
#commit

④NAT設定(アウトバウンド)
[edit]
#set nat source 100 outbound-interface eth0
#set nat source 100 translation address masquerade

⑤NAT設定(インバウンド)
ここでは、192.168.2.155にhttps(443)へのアクセスをNetScalerのVIP(172.26.1.16)へ変換しています。

[edit]
#set nat destination rule 100 address 192.168.2.155
#set nat destination rule 100 port 443
#set nat destination rule 100 inbound-interfrace eth0
#set nat destination rule 100 protocol tcp
#set nat destination rule 100 translation address 172.26.1.16
#set nat destination rule 100 translation port 443
#commit
#save

以上がvyosで設定した箇所です。※今回、ファイアウォールは設定していません。




■設定ファイルの保存についてメモ

・設定ファイル別名保存
[edit]
#save filename

※備考
設定ファイルは/configに保存されます。

・設定ファイル読み込み
[edit]
#load filename

※備考
変更点は#compareで表示されます。

コメント

このブログの人気の投稿

【ActiveDirectory】ドメコンはNTPサーバーとして使えるの?クライアントLinuxでもいける?