Sign inSign up

krzmaciek/netubu

By krzmaciek

•Updated over 2 years ago

Ubuntu-based, network tools, utilities and simple network configuration with environment variables

Image
Networking
Operating systems
0

306

krzmaciek/netubu repository overview

⁠NetUbu

You can use following environment variables to configure this image:

  • DEFAULT_ROUTE - it will replace default route assigned by Docker to the image by this one. Example: --env DEFAULT_ROUTE=192.168.7.2
  • MASQUERADE_SADDR - it will masquerade outgoing (postrouting) packets coming from provided network address. Example: --env MASQUERADE_SADDR=192.168.7.0/24

These options may be used to "emulate" working of an internal network hidden behind a NAT. For that you need to run a "router" container using the MASQUERADE_SADDR set to the "internal" network address and some container which will be in internal network, I call it "node" container, using the DEFAULT_ROUTE variable set to the address of the router container. Note that the node and the router container need to be in the same network (you can use normal -d bridge network). I recommend setting the router container IP address to some static IP inside that network to be sure that DEFAULT_ROUTE provided for the node container will always be correct.

NOTE: Use --cap-add NET_ADMIN when starting the nodes, because otherwise some settings may not be applied correctly!

Tag summary

Content type

Image

Digest

sha256:b0298f34a…

Size

335 MB

Last updated

over 2 years ago

docker pull krzmaciek/netubu