Find the answer to your Linux question:
Results 1 to 4 of 4
hello I am reading articles about ufw. I can't find a command to display and view the rules that are applied, that is all allows and denys or actually any ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2014
    Location
    Europe
    Posts
    14

    ufw a command to vew the rules


    hello

    I am reading articles about ufw. I can't find a command to display and view the rules that are applied, that is all allows and denys or actually any rule. What can I do to see what I have done/changed let's say 5 days ago... ?

    How can I view the rules in ufw?

    I tried
    sudo ufw status numbered

    but it only returns: active
    thanks
    Last edited by berserk; 03-25-2014 at 06:18 PM.

  2. #2
    Linux User Steven_G's Avatar
    Join Date
    Jun 2012
    Location
    Western US
    Posts
    415
    Yuo'll need to be root or sudo:

    Code:
    ufw status verbose
    or

    Code:
    iptables --list-rules
    or

    Code:
    ufw show raw
    Or you can install gufw or ipkungfu.

    Or take a look at this.

  3. #3
    Just Joined!
    Join Date
    Mar 2014
    Location
    Europe
    Posts
    14
    Thank you
    when I type the first line you suggested, the output is: Default: deny (incoming), allow (outgoing)

    How come the internet works fine? If the firewall denies incoming, the incoming data should not reach my computer. I send data, that's OK, because ufw allows outgoing, but why the data comes back whilst there is still deny (incoming) ?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User Steven_G's Avatar
    Join Date
    Jun 2012
    Location
    Western US
    Posts
    415
    You're a little confused on how firewalls work. That deny incoming means that anything you didn't ask for will be denied. Not that nothing will come in.

    Lets say I wanted to SSH in to your system and log in, since you did not initiate that inbound request your firewall will drop it.

    But when you go out to the web to surf you are basically saying: "Hey, please send me this." And since your system knows that you asked for it your system lets the info through the firewall.

Posting Permissions

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