Skip to Content
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Sign in
  • Nederlands English (US) Español (AR)
  • Contact Us
  • Home
  • Blog
  • Jobs
  • Contact us
Cafayate.Net
  • 0
  • 0
    • Home
    • Blog
    • Jobs
    • Contact us
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Sign in
  • Contact Us

Ubuntu UFW LXC

  • All Blogs
  • Tech Blog
  • Ubuntu UFW LXC
  • March 5, 2021 by
    Administrator

     

    I am working on setting up my own cloud servers using Linux Containers (LXC). These cloud containers allow me to build one image, replicated it, configure it, and have a new server online in seconds.

    I was having trouble getting access to the Internet from containers whenever I enabled UFW on the host machine. I tried a thousand different rules, but none worked. After much digging, I found the solution. UFW defaults to dropping forwarded packets. All my containers interact with the Internet via forwarding over a bridge (lxcbr0 in 12.04), so this is a big problem. Basically, with UFW enabled, the LXC containers could not talk to the internet. To solve the problem:

    sudo nano /etc/default/ufw
    ----
    # Change:
    # DEFAULT_FORWARD_POLICY="DROP"
    # to
    DEFAULT_FORWARD_POLICY="ACCEPT"
    

    Once I changed the rules, I just reload UFW, and all was well.

    ufw reload
    in Tech Blog
    Akeneo Disabling the Bootstrap File and Class Caching

    Designed for companies

    We are a team of passionate people whose goal is to improve everyone's life through disruptive products. We build great products to solve your business problems. Our products are designed for small to medium size companies willing to optimize their performance.

    Get in touch

    Plantexel
    Pedernera
    Salta Capital 
    Argenina

    • +31 653-919-302
    • [email protected]
    Follow us
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)