Article View: alt.privacy.anon-server
Article #249679UFWC - Make running UFW firewall easier - syntax additions
From: joe
Date: Sat, 25 Jun 2011 18:50
Date: Sat, 25 Jun 2011 18:50
61 lines
2946 bytes
2946 bytes
I added some more syntax to the script so that it now does all of the basic UFW commands, but does them with a less klunky syntax than UFW uses. The utility is at apasreader.yolasite.com. If you like UFW, keep using it directly, but I find this a lot easier to work with. The commands that are run when you type: ufwc start have also been changed to deny every port from 1 to 65535, for both incoming and outgoing. I changed it from the default deny statements because it seems that UFW lets some ports through with the default deny statments. I'm sure that is fine, but I'd rather make the decisions about which ports to open, not the guy who wrote the firewall. Here is the new syntax: ufwc add/del arg2 - add or delete rules via commands in file arg2 ufwc d <port list> - deny port(s) - incoming ufwc do <port list> - deny port(s) - outgoing ufwc al <port list> - allow port(s) - incoming ufwc alo <port list> - allow port(s) - outgoing ufwc display - displays current rules ufwc start - enables UFW with the two basic deny rules (deny everything), and enables logging. ufwc reset - removes all existing rules and disables UFW The 'file' mentioned in the first rule lets you put in as many UFW commands as you want, so you can allow or deny a slew of ports on one execution. For example, before I do a torrent download, I open the ports needed for that with: ufwc torrent. When the download is finished, I close the ports with: ufwc del torrent. Some more examples: ufwc d 5353,9001,8080,444/tcp - denies those ports on incoming ufwc do 666,1922/udp - denies them on outgoing for udp ufwc 456 - allow port 456 on incoming ufwc alo 456 - allow port 456 on outgoing ufwc outbasic1 - allows a bunch of ports on outgoing and incoming. The list is in a file called outbasic1. ufwc del outbasic1 - closes the ports listed in outbasic1.
Technical Details
Message-ID:
<h6qNp.57$Mo3.28@newsfe15.iad>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe15.iad.POSTED!00000000!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <h6qNp.57$Mo3.28@newsfe15.iad> Subject: UFWC - Make running UFW firewall easier - syntax additions Date: Sat, 25 Jun 2011 18:50:53 GMT From: joe <joe@nowhere.invalid> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe15.iad.POSTED!00000000!not-for-mail Newsgroups: alt.privacy.anon-server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 61 X-Complaints-To: abuse@UsenetServer.com NNTP-Posting-Date: Sat, 25 Jun 2011 18:50:53 UTC