View Full Version : RE; Firewall
offgridguy
January 31st, 2013, 04:26 PM
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??
sudo ufw allow out 51413/tcp sudo ufw allow out 51413/udp sudo ufw allow out 6969/tcp
:confused:
steeldriver
January 31st, 2013, 04:38 PM
I would think they need to be separate commands; either
sudo ufw allow out 51413/tcp ; sudo ufw allow out 51413/udp ; sudo ufw allow out 6969/tcpor
sudo ufw allow out 51413/tcp
sudo ufw allow out 51413/udp
sudo ufw allow out 6969/tcp
offgridguy
January 31st, 2013, 05:05 PM
I would think they need to be separate commands; either
sudo ufw allow out 51413/tcp ; sudo ufw allow out 51413/udp ; sudo ufw allow out 6969/tcpor
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.
Doug S
January 31st, 2013, 05:23 PM
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 (http://ubuntuforums.org/showthread.php?t=1876124).
offgridguy
January 31st, 2013, 05:33 PM
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.
bodhi.zazen
January 31st, 2013, 06:27 PM
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.
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
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.
offgridguy
January 31st, 2013, 06:59 PM
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.
Ms. Daisy
February 1st, 2013, 04:38 AM
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! ;)
offgridguy
February 1st, 2013, 04:27 PM
Offgridguy- take some screen shots while you work on that! ;)
:-k
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.