Results 1 to 2 of 2

Thread: Basic UFW setup - all outbound traffic blocked

  1. #1
    Join Date
    Apr 2021
    Beans
    1

    Question Basic UFW setup - all outbound traffic blocked

    Hi all,

    Brand new Ubuntu 20.04 Server installation and I have applied the following UFW configuration.
    Code:
    ufw allow in on lo
    ufw allow out from lo
    ufw deny in from 127.0.0.0/8
    ufw deny in from ::1
    ufw allow out on all
    ufw allow in ssh
    ufw default deny incoming
    ufw default deny outgoing
    ufw default deny routed
    ufw enable
    With the following result.

    Code:
    Status: active
    Logging: on (low)
    Default: deny (incoming), deny (outgoing), disabled (routed)
    New profiles: skip
    
    
    To                         Action      From
    --                         ------      ----
    Anywhere on lo             ALLOW IN    Anywhere
    Anywhere                   DENY IN     127.0.0.0/8
    22/tcp                     ALLOW IN    Anywhere
    Anywhere (v6) on lo        ALLOW IN    Anywhere (v6)
    Anywhere (v6)              DENY IN     ::1
    22/tcp (v6)                ALLOW IN    Anywhere (v6)
    
    
    Anywhere                   ALLOW OUT   Anywhere on lo
    Anywhere                   ALLOW OUT   Anywhere on all
    Anywhere (v6)              ALLOW OUT   Anywhere (v6) on lo
    Anywhere (v6)              ALLOW OUT   Anywhere (v6) on all
    SSH in is working as expected. However no outbound traffic (DNS, apt, ICMP etc) is working. My understanding is this should be covered by the ufw allow out on all rule?

    Any assistance to understand where I have gone wrong would be greatly appreciated. Thanks in advance.

  2. #2
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Basic UFW setup - all outbound traffic blocked

    Is there a return path for your outgoing traffic?
    With iptables, which ufw is just a front end for, the path would be via a "RELATED,ESTABLISHED" rule.
    I do not use ufw, so do not know the answer.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •