jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.21k stars 727 forks source link

help on assigning public ip to container #223

Closed kbron closed 5 months ago

kbron commented 6 years ago

hello, thank you for pipework

I`ve been struggling hard trying to get a container to have public ip address assigned by dhcp

(running kali linux on virtualbox, network is that III type and promisc mode allow all is already set)

I´m following these instructions: https://stackoverflow.com/questions/27516284/is-it-possible-to-assign-a-static-public-ip-to-a-docker-container

`commands:

ip link add dev macvlan0 link eth0 type macvlan #macvlan0 being the name of the v-card (lol)

Connect container to virtual network interface with pipework:

see https://github.com/jpetazzo/pipework/#connect-a-container-to-a-local-physical-interface

commands:

pipework macvlan0 $($containerid) dhcp`

This does not work, cause I get only an 172.x.x ip which is not accesible from external networks

I`m trying to get an external ip address assigned to the container, just like a vm machine does in bridge mode. Is that possible? Please help, I've been stuck on that for several days now

thank you best regards

jpetazzo commented 5 months ago

Closing old issues.