Results 1 to 9 of 9

Thread: RE; Firewall

  1. #1
    Join Date
    Jul 2012
    Beans
    Hidden!

    RE; Firewall

    Regarding firewall settings using ufw here.

    https://wiki.ubuntu.com/BasicSecurity/Firewall

    When i get to this command and paste it into the terminal, i get invalid clause message??

    Code:
    sudo ufw allow out 51413/tcp sudo ufw allow out 51413/udp sudo ufw allow out 6969/tcp

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: RE; Firewall

    I would think they need to be separate commands; either

    Code:
    sudo ufw allow out 51413/tcp ; sudo ufw allow out 51413/udp ; sudo ufw allow out 6969/tcp
    or

    Code:
    sudo ufw allow out 51413/tcp 
    sudo ufw allow out 51413/udp 
    sudo ufw allow out 6969/tcp

  3. #3
    Join Date
    Jul 2012
    Beans
    Hidden!

    Re: RE; Firewall

    Quote Originally Posted by steeldriver View Post
    I would think they need to be separate commands; either

    Code:
    sudo ufw allow out 51413/tcp ; sudo ufw allow out 51413/udp ; sudo ufw allow out 6969/tcp
    or

    Code:
    sudo ufw allow out 51413/tcp 
    sudo ufw allow out 51413/udp 
    sudo ufw allow out 6969/tcp
    You could be right, however the other commands to that point worked verbatim. perhaps the
    addition of && between commands ?? Thanks for the reply, I will try your suggestion.
    Last edited by offgridguy; January 31st, 2013 at 05:15 PM.

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

    Re: RE; Firewall

    I edited the wiki. I think 3 separate lines was the original intent, but it did not render as such.

    Edit: It is 3 separate lines in Dandertux's original forums thread.
    Last edited by Doug S; January 31st, 2013 at 05:43 PM. Reason: added something

  5. #5
    Join Date
    Jul 2012
    Beans
    Hidden!

    Re: RE; Firewall

    Quote Originally Posted by Doug S View Post
    I edited the wiki. I think 3 separate lines was the original intent, but it did not render as such.
    It does work as three separate commands, thanks.

  6. #6
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: RE; Firewall

    it is a small technical issue, but with bash, on the command line, ";" means to continue. So you can type it all on one line. If it did not work there was a typo.

    Code:
    bodhi@ubuntu~# echo "1" ; echo "2"
    1
    2

    With that in mind, 3 separate lines on the wiki is more readable and less technical (IMO)

    On the command line, && and || are logical operators, and / or

    Code:
    bodhi@ubuntu~# ecko "1"
    zsh: command not found: ecko
    
    bodhi@ubuntu~# ecko "1" || echo "wrong command"
    zsh: command not found: ecko
    wrong command
    
    bodhi@ubuntu~# ecko "1" && echo "wrong command"
    zsh: command not found: ecko
    bodhi@ubuntu~#
    sure I am using zsh, same thing in bash.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  7. #7
    Join Date
    Jul 2012
    Beans
    Hidden!

    Re: RE; Firewall

    bohdi.zazen, thanks for the info, i am glad the wiki has been edited as well. I knew it wasn't a typo on my part as i was pasting it into the terminal.

  8. #8
    Join Date
    Sep 2011
    Beans
    1,531

    Re: RE; Firewall

    My bad. Thanks for fixing it Doug.

    And that reminds me I never replaced the photos. That was the whole reason I copied Dangertux's thread into the wiki.

    Offgridguy- take some screen shots while you work on that!
    Last edited by Ms. Daisy; February 1st, 2013 at 04:43 AM. Reason: Derp

  9. #9
    Join Date
    Jul 2012
    Beans
    Hidden!

    Re: RE; Firewall

    Quote Originally Posted by Ms. Daisy View Post

    Offgridguy- take some screen shots while you work on that!

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
  •