Very easy dumping of traffic with the w flag. You can use it for screen and later for wireshark analyses.
1 | tcpdump -w http_traffic -n -i any port 80 |
Very easy dumping of traffic with the w flag. You can use it for screen and later for wireshark analyses.
1 | tcpdump -w http_traffic -n -i any port 80 |
tcpdump -w http_traffic -n -i any port 80
1 | SELECT password FROM vb_user INTO OUTFILE '/tmp/pwds.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; |
SELECT password FROM vb_user INTO OUTFILE '/tmp/pwds.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
This article was written for Xen 3.2, it was successful tested on debian lenny 5.0.3
I describe how to use multiple physical network cards associated to different bridges and Virtual VE (guests). By default Xen uses ony one bridge and physical NIC -> eth0
First step is to create a script that will create the bridges for your physical NICs.
/etc/xen/scripts/your-script
– eth0 is used for the Xen Dom0
– eth1 is used for VE1
– eth2 is used for VE2
1 2 3 4 5 | #!/bin/sh NETBR="/etc/xen/scripts/network-bridge" $NETBR start bridge="eth1_br" vifnum=1 netdev="eth1" $NETBR start bridge="eth2_br" vifnum=2 netdev="eth2" exit 0 |
#!/bin/sh NETBR="/etc/xen/scripts/network-bridge" $NETBR start bridge="eth1_br" vifnum=1 netdev="eth1" $NETBR start bridge="eth2_br" vifnum=2 netdev="eth2" exit 0
Don’t forget to make it executable! chmod +x your-script
This script will be called from
/etc/xen/xend-config.sxp
put this line to it:
1 | (network-script your-script) |
(network-script your-script)
and remove or comment this out:
1 2 | (vif-script vif-bridge) (network-script network-dummy) |
(vif-script vif-bridge) (network-script network-dummy)
then you can configure the bridge for your VE (virtual-guest)
open your config /etc/xen/node1.cfg
and remove the standard bridge: vif = [ ‘ip=192.168.1.101,mac=00:16:3E:71:0B:18’ ]
add your new bridge: vif=[‘bridge=eth1_br’]
No routing configuration is needed! fellow
With following commands you can check your bridging configuration:
brctl show
Check the routing information
netstat -arn
Q: WHY is it interesting to use this kind of configuration?
A: The traffic cannot be sniffed by Dom0, DomN or Dom2
Some reasons:
1. If you get some problems with your primary NIC eth0 your xen dom0 will not be available but your guests are still alive and can communicate
2.If somebody hack your Xen Dom0 nobody can sniff ALL traffic of the VE’s, Guests
It is possible that this configuration will not work with older xen versions, your-script must be edited wassat
Have you any questions, please do not hesitate to contact me fellow
As I know, there are two ways to calculate the MySQL database size:
First one:
1 | du -shc /var/lib/mysql/* |
du -shc /var/lib/mysql/*
Second one:
1 | SELECT table_schema ,SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema; |
SELECT table_schema ,sum( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;
Show uptime: xm uptime
Realtime monitoring: xm top
List domains: xm list
Host info: xm info
Show processor info: xm vcpu-list
Show network interfaces: xm network-list
Show node information: virsh nodeinfo
Show domain V-processor info: virsh vcpuinfo
Show xend log: xm log
domain information: virsh dominfo
Create node: xm create /etc/xen/node.cfg