- Set up a virtual network that uses nat
- Build machines using that network
- Figure out what bridge device this network is using (my example is "hundrednet")
virsh net-info hundrednet | grep -i bridge
- Configure that network to only communicate internally and to the proxy
sudo iptables -L FORWARD --line-numbers --verbose
- find the line for this network like
7 66 7322 ACCEPT all -- virbr2 any 192.168.100.0/24 anywhere
- replace that line (line 7 in the example) with one that only accepts traffic to the proxy:
sudo iptables -R FORWARD 7 -i virbr2 -s 192.168.100.0/24 -p tcp --dport 3128 -j ACCEPT
Note that this uses the same input interface (-i
), the same source range (-s
), and adds TCP protocol and destination port 3128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipe = 1/2; | |
bearing_id = 3/8; | |
bearing_od = 7/8; | |
bearing_w = 9/32; | |
// max overlap is 0.50 == 50% | |
pipe_overlap_multiplier = 0.35; | |
pulley_od = 3; | |
pulley_lip = 1/16; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// process arbitrary 1+2-(3+(5-1))-2 style equations | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
int parse(char[]); | |
int process(int, char, int); | |
struct State { | |
int total; | |
char operator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo virt-install --name=leap15_dev --vcpus=8 --memory=$((1024*32)) --disk path=/var/lib/libvirt/local/leap15.qcow --os-variant=opensuse15.1 --import |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/local/src | |
sudo mkdir netdata && sudo chown --reference=$HOME netdata/ | |
git clone https://github.com/netdata/netdata.git --depth=100 | |
cd netdata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sauer@lightning:~$ sudo grep 2019-01-24 /var/log/zypp/history | awk -F\| '$2=="install"{print $3,$4,$5}' | sort | |
alsa-plugins 1.1.8-1.1 x86_64 | |
apparmor-abstractions 2.13.2-3.1 noarch | |
apparmor-docs 2.13.2-3.1 noarch | |
apparmor-parser 2.13.2-3.1 x86_64 | |
apparmor-parser-lang 2.13.2-3.1 noarch | |
apparmor-profiles 2.13.2-3.1 noarch | |
apparmor-utils 2.13.2-3.1 noarch | |
apparmor-utils-lang 2.13.2-3.1 noarch | |
bison 3.2.4-1.1 x86_64 |
To override name resolution, create a mount namespace and bind mount a special resolv.conf over the top of the original. The IP address will be the first address in the range given to the virtual network. I used 192.168.68.0/22, so the DNS server (dnsmasq) is started by KVM on 192.168.68.1. You can "discover" that by getting the information for the network, then looking at the IP address assigned to the bridge device:
sauer@lightning:~> sudo virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
caasp-dev-net active no yes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# creating a new VG with the second hard disk in the system | |
sudo virsh pool-define-as default logical - - /dev/sdb libvirt_lvm /dev/libvirt_lvm | |
sudo virsh pool-build default --overwrite | |
sudo virsh pool-start default | |
# as a directory | |
sauer@helium:~/kubic-project/automation> virsh pool-edit default | |
<pool type='dir'> | |
<name>default</name> | |
<uuid>fdab5cc0-94a6-4349-892c-1fe133158406</uuid> |
NewerOlder