vether to veb
This commit is contained in:
parent
081dc7c687
commit
a6f69992ae
|
@ -16,7 +16,7 @@ then
|
|||
echo 'library_aslr=NO' >> /etc/rc.conf.local
|
||||
fi
|
||||
|
||||
pkg_add openbox neofetch xneko dillo firefox-esr chromium claws-mail-- thunar keepassxc-- lagrange clic catgirl dino aerc xfce4-terminal
|
||||
pkg_add openbox neofetch xneko dillo firefox-esr chromium claws-mail-- thunar keepassxc-- lagrange clic catgirl dino aerc xfce4-terminal stumpwm xclip mousepad
|
||||
|
||||
# we want sshd to be started by rc.local
|
||||
# so copied/mounted /home is ready
|
||||
|
|
18
bin/setup.sh
18
bin/setup.sh
|
@ -29,23 +29,23 @@ fi
|
|||
|
||||
# generate NAT PF rule
|
||||
cat <<EOF >/var/openkubsd/pf/nat
|
||||
match out on egress from vether0:network to any nat-to (egress)
|
||||
pass in proto { udp tcp } from vether0:network to any port domain \
|
||||
match out on egress from vport0:network to any nat-to (egress)
|
||||
pass in proto { udp tcp } from vport0:network to any port domain \
|
||||
rdr-to 9.9.9.9 port domain
|
||||
EOF
|
||||
|
||||
# generate network interfaces
|
||||
cat <<EOF >/etc/hostname.vether0
|
||||
cat <<EOF >/etc/hostname.vport0
|
||||
inet 10.100.0.1 255.255.255.0
|
||||
up
|
||||
EOF
|
||||
sh /etc/netstart vether0
|
||||
sh /etc/netstart vport0
|
||||
|
||||
cat <<EOF >/etc/hostname.bridge0
|
||||
add vether0
|
||||
cat <<EOF >/etc/hostname.veb0
|
||||
add vport0
|
||||
up
|
||||
EOF
|
||||
sh /etc/netstart bridge0
|
||||
sh /etc/netstart veb0
|
||||
|
||||
# Configure vmd to use a switch
|
||||
cat <<EOF >/etc/vm.conf
|
||||
|
@ -55,7 +55,7 @@ EOF
|
|||
|
||||
cat <<EOF >/var/openkubsd/vm.conf.d/switch.conf
|
||||
switch "kubes" {
|
||||
interface bridge0
|
||||
interface veb0
|
||||
locked lladdr
|
||||
}
|
||||
EOF
|
||||
|
@ -82,7 +82,7 @@ pfctl -a openkubsd -f /var/openkubsd/pf/nat
|
|||
|
||||
# restart vmd
|
||||
rcctl enable dhcpd
|
||||
rcctl set dhcpd flags vether0
|
||||
rcctl set dhcpd flags vport0
|
||||
rcctl restart dhcpd
|
||||
rcctl enable vmd
|
||||
rcctl restart vmd
|
||||
|
|
Loading…
Reference in New Issue
Block a user