Weitere ähnliche Inhalte
Ähnlich wie Vagrant packana16-otahi (20)
Kürzlich hochgeladen (11)
Vagrant packana16-otahi
- 8. どんな設定? Vagrantfile
Vagrant::Config.run do |config|
config.vm.box = "centos64-base"
config.vm.network :hostonly, "192.168.100.10"
config.vm.share_folder "share", "/home/vagrant/share", "./share"
config.vm.provision "shell", path: "share/init.sh"
end
- 10. どんな設定? iptables
#!/bin/sh
iptables -F
iptables -X
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -A INPUT -p tcp --dport 22 -s 0.0.0.0/0 -j ACCEPT
iptables -A INPUT -p tcp --sport 3128 -s 192.168.100.0/24 -j ACCEPT
iptables -A INPUT -j LOG --log-level info
iptables -A OUTPUT -p tcp --sport 22 -d 0.0.0.0/0 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 3128 -d 192.168.100.0/24 -j ACCEPT
iptables -A OUTPUT -j LOG --log-level info
route delete default
- 12. demo
% vagrant box add centos64-base ~/vagrant/CentOS-6.4-
x86_64-v20130427.box
(% vagrant init)
(% vi Vagrantfile)
% vagrant up
% vagrant ssh
Vagrant% source share/proxyenv
Vagrant% sudo -E yum install tcpdump
Vagrant% sudo tcpdump -i any -s0 -w share/pakeana.pcap
'port !22'
% tail -f pakeana/share/pakeana.pcap| wireshark -k -i -