labunix's blog

labunixのラボUnix

Endian UTMをVMware Workstation Plaer12に導入してみる。

■Endian UTMをVMware Workstation Plaer12に導入してみる。
 「Sophos UTM Home Edition」も個人理容に限り無償で面白そうだけど、
 今回はEndian UTM。

$ vmware -v
VMware Player 12.0.1 build-3160714

■以下のリンク先のSourceForgeからダウンロード

 Endian Firewall Community
 http://osdn.jp/projects/sfnet_efw/downloads/VMware%20Images/EFW2-VMware/EFW2-Community-VMWARE.zip/

$ md5sum < EFW2-Community-VMWARE.zip
feb718feb8341e686bd9bde9896b7bbf  -

$ zipinfo EFW2-Community-VMWARE.zip  | awk '{print $NF}'
EFW2-Community-VMWARE.zip
5
EFW_Community_2/
EFW_Community_2/EFW_Community_2.nvram
EFW_Community_2/EFW_Community_2.vmdk
EFW_Community_2/EFW_Community_2.vmsd
EFW_Community_2/EFW_Community_2.vmx
65.7%

■ホストのIPセグメントを確認。

$ ip a list vmnet8 | awk '/inet /{print $2}'
192.168.152.1/24

■ZIPを展開

$ cd ~/vmware/
$ mv ~/EFW2-Community-VMWARE.zip .
$ unzip EFW2-Community-VMWARE.zip 
Archive:  EFW2-Community-VMWARE.zip
   creating: EFW_Community_2/
  inflating: EFW_Community_2/EFW_Community_2.nvram  
  inflating: EFW_Community_2/EFW_Community_2.vmdk  
 extracting: EFW_Community_2/EFW_Community_2.vmsd  
  inflating: EFW_Community_2/EFW_Community_2.vmx  

■VMwarePlayerで開いてNICを編集。
 NAT、hostonly、hostonlyとした。

 初期ログインのユーザ名は「root」、パスワードは「endian」。

■IPがちゃんと取れていないようなので、一時的な変更。
 ブリッジインターフェイスは一番最初のNICに紐づいているので、
 ホストのvmnet8のセグメントに合わせる。

# brctl show br0
bridge name	bridge id		STP enabled	interfaces
br0		0000.000c291aa598	no		eth0

# ifconfig 192.168.152.200/24
# route add default gw 192.168.152.2

■上記でpingが通るがログオフしても、httpも待受IPが変わっていない様子。
 英語キーボードなので頑張ってawkなり、grepなりしてPIDを確認。

# netstat -anp | awk '/:80/{print $NF}'
1631/httpd

# cat /etc/httpd/conf.d/green.conf 
Listen 192.168.74.1:80

■「green.conf」を書き換えれば良い。
 「netstat -anp」で調べたhttpdサービスを再起動

# echo "Listen 192.168.152.200:80" > /etc/httpd/conf.d/green.conf
# kill -HUP 1631

# netstat -anp | grep 80 | sed -e 's/  */,/g'
tcp,0,0,192.168.152.200:80,0.0.0.0:*,LISTEN,1631/httpd,

■後は普通に「http://192.168.152.200/」でブラウザを開く。
 ログオフ後の説明通り、Web管理画面のログインの場合、
 ユーザ名は「admin」、パスワードは「endian」

■上記のIPアドレス設定は一時的なものなので、
 「RED」、「BLUE」、「GREEN」と「Network Configuration」の
 ウイザードを進めて、IPアドレスを保存しておく。

 [システム]メニュー
 http://www.plum-systems.co.jp/endian-manual/2.4/system.html

■後はお好みで。
 補足、Other Linux 2.6系、RHEL4ベース。

# cat /etc/endian-release 
Endian Firewall release 2

# uname -r
2.6.9-34.0.1.EL.endian14
# rpm -qi kernel-2.6.9-34.0.1.EL.endian14 | grep ^Ver
Version     : 2.6.9                             Vendor: (none)
# rpm -qa efw*
efw-configroot-1.1.93-0.endian1
efw-frox-1.1.10-0.endian0
efw-dhcpd-1.1.13-0.endian0
efw-network-1.1.52-0.endian9
efw-proxy-1.1.67-0.endian4
efw-havp-1.1.19-0.endian2
efw-mailgraph-1.0.8-0.endian1
efw-siproxd-1.1.17-0.endian4
efw-smtpscan-1.1.50-0.endian2
efw-contentfilter-1.1.22-0.endian2
efw-clamav-1.1.17-0.endian0
efw-spamassassin-1.1.19-2.endian6
efw-popscan-1.1.26-0.endian0
efw-iptfilters-0.2-1
efw-firewall-1.1.36-0.endian1
efw-dansguardian-1.1.38-0.endian7
efw-snort-1.1.16-0.endian1
efw-netwizard-1.1.41-0.endian2
efw-base-1.1.81-0.endian11
efw-vpn-1.1.61-0.endian1
efw-smtpd-1.1.34-0.endian5
efw-antivirus-1.1.8-1.endian0