feat(linux): set/unset urunit environment variable for default route#284
Merged
Conversation
✅ Deploy Preview for urunc canceled.
|
3205c22 to
fa5263d
Compare
ananos
approved these changes
Sep 23, 2025
In the case of Linux guests, urunit by default used to set as the default route the eth0 interface. However, this was creating issues with docker and nerdctl, where the container could not reach the outside network. Nevertheless, this was required in k8s set ups, since the IP of the container could be in a different subnet than the gateway and the Linux kernel can not handle such network configuration. To fix the above, use a specific environment variable for urunit, called `URUNIT_DEFROUTE`, which urunc sets it only when the IP of the container is in a different subnet than the gateway. Otherwise urunc will not set it. From urunit's side, if the environment variable is set, then it will use the eth0 interface as the default route. PR: #284 Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk> Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk> Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
fa5263d to
06f169c
Compare
|
panosmaurikos
pushed a commit
to panosmaurikos/urunc
that referenced
this pull request
Sep 30, 2025
In the case of Linux guests, urunit by default used to set as the default route the eth0 interface. However, this was creating issues with docker and nerdctl, where the container could not reach the outside network. Nevertheless, this was required in k8s set ups, since the IP of the container could be in a different subnet than the gateway and the Linux kernel can not handle such network configuration. To fix the above, use a specific environment variable for urunit, called `URUNIT_DEFROUTE`, which urunc sets it only when the IP of the container is in a different subnet than the gateway. Otherwise urunc will not set it. From urunit's side, if the environment variable is set, then it will use the eth0 interface as the default route. PR: urunc-dev#284 Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk> Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk> Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
codesmith25103
pushed a commit
to codesmith25103/urunc
that referenced
this pull request
Oct 2, 2025
In the case of Linux guests, urunit by default used to set as the default route the eth0 interface. However, this was creating issues with docker and nerdctl, where the container could not reach the outside network. Nevertheless, this was required in k8s set ups, since the IP of the container could be in a different subnet than the gateway and the Linux kernel can not handle such network configuration. To fix the above, use a specific environment variable for urunit, called `URUNIT_DEFROUTE`, which urunc sets it only when the IP of the container is in a different subnet than the gateway. Otherwise urunc will not set it. From urunit's side, if the environment variable is set, then it will use the eth0 interface as the default route. PR: urunc-dev#284 Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk> Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk> Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
This was referenced Jun 8, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



In the case of Linux guests, urunit by default used to set as the default route the eth0 interface. However, this was creating issues with docker and nerdctl, where the container could not reach the outside network. Nevertheless, this was required in k8s set ups, since the IP of the container could be in a different subnet than the gateway and the Linux kernel can not handle such network configuration.
To fix the above, use a specific environment variable for urunit, called
URUNIT_DEFROUTE, which urunc sets it only when the IP of the container is in a different subnet than the gateway. Otherwise urunc will not set it. From urunit's side, if the environment variable is set, then it will use the eth0 interface as the default route.