Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioc_start.py: allow setting IP address on lo0 #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Defenso-QTH
Copy link
Contributor

Please merge #47 first.


Currently, iocage ignores IP addresses given for the loopback interface
lo0 that exists by default in a VNET jail. Adding addresses to that
interface can be useful, for instance to implement rfc7404 addressing
where link-local addresses are used for interconnections, and routable
addresses are set on loopback interfaces.

This commit enables setting additional addresses on the lo0 interface
using the usual ip4_addr or ip6_addr settings.
For instance: ip4_addr='lo0|192.168.2.10'

Closes #46

Iocage currently expects interfaces to be specified in the nic:bridge
format, where bridge cannot be none. This results in iocage always
creating a bridge to which VNET jail epair interfaces are added as
members.

In a scenario where the user wants jails to be isolated on the data-link
layer (OSI layer 2 / Ethernet) and use the host as a router, this bridge
is unnecessery. It can also result in illegitimate cross-jail traffic
being allowed, since pf filtering on bridge interfaces is disabled by
default on FreeBSD systems (net.link.bridge.pfil_bridge=0).

Closes freebsd#44
Currently, iocage ignores IP addresses given for the loopback interface
lo0 that exists by default in a VNET jail. Adding addresses to that
interface can be useful, for instance to implement rfc7404 addressing
where link-local addresses are used for interconnections, and routable
addresses are set on loopback interfaces.

This commit enables setting additional addresses on the lo0 interface
using the usual ip4_addr or ip6_addr settings.
For instance: ip4_addr='lo0|192.168.2.10'

Closes freebsd#46
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11916048528

Details

  • 0 of 5 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 7.738%

Changes Missing Coverage Covered Lines Changed/Added Lines %
iocage_lib/ioc_start.py 0 5 0.0%
Totals Coverage Status
Change from base Build 11334365279: -0.002%
Covered Lines: 798
Relevant Lines: 7803

💛 - Coveralls

1 similar comment
@coveralls
Copy link

coveralls commented Nov 19, 2024

Pull Request Test Coverage Report for Build 11916048528

Details

  • 0 of 5 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 7.738%

Changes Missing Coverage Covered Lines Changed/Added Lines %
iocage_lib/ioc_start.py 0 5 0.0%
Totals Coverage Status
Change from base Build 11334365279: -0.002%
Covered Lines: 798
Relevant Lines: 7803

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot assign an IP to localhost interface of VNET jail
2 participants