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

Does not work on Ubuntu 22.04.1 LTS #85

Open
NightHammer1000 opened this issue Dec 1, 2022 · 7 comments
Open

Does not work on Ubuntu 22.04.1 LTS #85

NightHammer1000 opened this issue Dec 1, 2022 · 7 comments

Comments

@NightHammer1000
Copy link

After setting it up like described and like I have don so many times before, all the Ports from Docker are still reachable without allowing them.

Looks like something broke.

@nyanmarudesu
Copy link

Hi, i exactly did how described and for me is working. Having same Ubuntu version

@bydavy
Copy link

bydavy commented Dec 16, 2022

I can confirm that it DOES NOT work for me either and I am on 22.04.1 LTS too.

@bydavy
Copy link

bydavy commented Dec 16, 2022

Oh I think the script accept all connections from the local network which I did not expect. After removing any reference to 192.168.0.0/16, I have the expected behavior.

https://github.com/chaifeng/ufw-docker/blob/master/ufw-docker#L332

@rfortunatti
Copy link

Oh I think the script accept all connections from the local network which I did not expect. After removing any reference to 192.168.0.0/16, I have the expected behavior.

https://github.com/chaifeng/ufw-docker/blob/master/ufw-docker#L332

After reverting the iptables to the default state, I commented on the ufw-docker script the line referencing 10.0.0.0/8 because my local network is on 10.x. It blocked everything opened by the containers by default after rebooting the machine.

https://github.com/chaifeng/ufw-docker/blob/master/ufw-docker#L330

Allowing specific container-port pairs with "ufw-docker allow" now works as expected,

@zbejas
Copy link

zbejas commented Mar 6, 2023

I can also confirm it's not working on 22.04.2. Nmap returns every docker port there is.

Edit: I have tried commenting out the lines mentioned above, but nothing changed.
Edit 2: I have realized I am using a separate network for 3 of my services: MySQL, PHPMyAdmin, and a WordPress site. all three of those are exposed.

For example, Portainer isn't.

How the network is defined in compose.yml

networks:
  db_bridge:
    driver: bridge
    ipam:
      config:
        - subnet: 172.10.0.0/16

Edit 3: I have fixed it all by just changing the subnet to 172.20.0.0/16

@alneven
Copy link

alneven commented May 1, 2023

I couldn't solve this issue, as I enabled ufw-docker the containers I had (nginx proxy manager and portainer) wasn't even reachable local, so I have changed the portainer port to "expose" and now it is only reachable over subdomain.mydomain.com but not per IP:port nor host:port from the server.
And I configured the npm admin port (81) also as expose, and only let the 443 and 80 as public port for the internet on the mydomain.

@mbay-ODW
Copy link

mbay-ODW commented Jan 5, 2024

I made it working with that Tutorial from docker here directly Docker-eth

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

No branches or pull requests

7 participants