Skip to content

Purple-Flag-Hosting/docker-external-ip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Run:

$ docker run --detach --net=host --cap-add=NET_ADMIN --cap-add=NET_RAW --volume /var/run/docker.sock:/var/run/docker.sock quay.io/dreae/docker-external-ip

After that, if any other Docker container has an environment variable SERVER_IP set, with an IP address to use for containers external IP, iptables will be configured to route container's traffic from that external IP.

A chain named EXTERNAL_IP is created in the nat table into which all the rules are added. And one more empty chain is created after this one for any additional custom rules you might want to add, named AFTER_EXTERNAL_IP.

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%