Skip to content

Instantly share code, notes, and snippets.

@ssteidl
Last active December 16, 2019 15:13
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 ssteidl/909b2df0dda52d1e24c4d3d4d36c5f7b to your computer and use it in GitHub Desktop.
Save ssteidl/909b2df0dda52d1e24c4d3d4d36c5f7b to your computer and use it in GitHub Desktop.
Jail networking with epair, bridge and vlan

Introduction

Notes on creating internal networks (same hosts) for jails using bridge, epair and vlans.

ifconfig bridge create name testnetbridge

ifconfig epair create

ifconfig epair0a name testneta

ifconfig epair0b name testnetb

ifconfig epair create

ifconfig epair1a name testnethosta

ifconfig epair1b name testnethostb

ifconfig testnethosta 192.168.101.1

ifconfig testnetbridge addm testnethostb

ifconfig testnetbridge addm testnetb

ifconfig testnetb up

ifconfig testnethostb up

ifconfig testnetbridge up

ifconfig testneta vnet=testjail

jexec testjail ifconfig testneta 192.168.101.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment