Last active
February 6, 2016 20:50
-
-
Save nlienard/1a6123e19eb905225617 to your computer and use it in GitHub Desktop.
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
rc.conf | |
-------------------- | |
gateway_enable="YES" | |
# FW | |
pf_enable="YES" | |
pf_rules="/etc/pf.conf" | |
pflog_enable="YES" | |
pflog_logfile="/var/log/pflog" | |
# VPN CLIENT | |
openvpn_client1_enable="YES" | |
openvpn_client1_if=tap | |
openvpn_client1_configfile="/usr/local/etc/openvpn/client.conf" | |
openvpn_client1=dir="/usr/local/etc/openvpn" | |
cloned_interfaces="tap1 tap2 tap3 tap4 bridge0 bridge1 bridge2" | |
ifconfig_tap2="mtu 1496" | |
ifconfig_bridge1="mtu 1496" | |
ifconfig_sw_public="addm tap1 addm ix0 up" | |
ifconfig_sw_lan10="addm tap2 up" | |
ifconfig_sw_lan11="addm tap3 addm tap0 up" | |
ifconfig_bridge0_name="sw_public" | |
ifconfig_bridge1_name="sw_lan10" | |
ifconfig_bridge2_name="sw_lan11" | |
iohyve_enable="YES" | |
-------------------- | |
VPN | |
--------------------- | |
# cat /usr/local/etc/openvpn/upclient.sh | |
#!/bin/sh | |
# LAN Hypervisor | |
/sbin/ifconfig tap0 192.168.11.101 | |
# vLAN Infra | |
/sbin/ifconfig vlan10 create | |
/sbin/ifconfig vlan10 vlan 10 vlandev tap0 | |
/sbin/ifconfig vlan10 192.168.10.101 | |
/sbin/ifconfig sw_lan10 addm vlan10 | |
------ | |
sysctl.conf | |
---------- | |
net.inet.ip.forwarding=1 | |
net.link.tap.up_on_open=1 | |
-------- | |
/boot/loader.conf | |
--------- | |
vmm_load="YES" | |
nmdm_load="YES" | |
if_bridge_load="YES" | |
if_tap_load="YES" | |
---------- | |
iohyve | |
----------- | |
root@dnxovh-hy001:~ # iohyve taplist | |
Listing all network taps: | |
zroot/iohyve/dnxovh-pf001......tap1,tap2,tap3,tap4 | |
root@dnxovh-hy001:~ # iohyve list | |
Guest VMM? Running? rcboot? Description | |
dnxovh-pf001 YES YES YES Mon_Feb__1_19:38:48_CET_2016 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
root@dnxovh-hy001:~ # cat /usr/local/etc/openvpn/upclient.sh
!/bin/sh
LAN Hypervisor
/sbin/ifconfig tap0 192.168.11.101
vLAN Infra
/sbin/ifconfig vlan10 create
/sbin/ifconfig vlan10 vlan 10 vlandev tap0
/sbin/ifconfig vlan10 192.168.10.101
/sbin/ifconfig sw_lan10 addm vlan10