Skip to content

Instantly share code, notes, and snippets.

@wunki
Created September 28, 2015 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wunki/26c7bdf893d2a2c40374 to your computer and use it in GitHub Desktop.
Save wunki/26c7bdf893d2a2c40374 to your computer and use it in GitHub Desktop.
# rc.conf
# set up two bridge interfaces for iocage
cloned_interfaces="bridge0 bridge1"
# join interfaces, add the private interface to bridge0
ifconfig_bridge0="inet 10.1.1.254/24 addm vtnet1 up"
# public network
ifconfig_vtnet0="inet 37.97.135.78 netmask 255.255.255.0"
# private network
ifconfig_vtnet1="inet 192.168.1.15/24 netmask 255.255.255.0"
# routing
defaultrouter="37.97.135.78"
## IOCAGE ##
Now I run the following in iocage:
iocage create tag=foo
iocage set defaultrouter=10.1.1.254 foo
iocage set ip4_addr=10.1.1.1 foo
In iocage I can ping the router: 10.1.1.254 but I can't ping the private interface 192.168.1.15.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment