WizardKit/archlive/airootfs/etc/ufw/before.rules
Alan Mason d8952ed26f 2017-01: Retroactive Updates
* Disabled gputest
  * The package is failing to install.

* Now using Midori GTK3 build
  * GTK2 was pulled from main repos for security reasons

* Removed warnings about missing UFD
  * For use with live sessions

* Wallpaper updated for live sessions
  * Wallpaper is now set at startup
  * Checks for UFD source but defaults to included file
  * Bugfix: Wallpaper is now set for multiple monitor/workspace setups

* Disabled choose-mirror service

* Better permission handling
  * build-wk now checks if running as root
  * build-wk now sets permissions before calling build.sh
    * Should prevent build failues as build.sh expects files to be owned by root
    * build-wk sets ownership back to builduser.builduser during cleanup

* Better menu for HW-Diags
  * The script now returns to the menu after running a selection
    * Unless the mode was set directly by passing a valid argument
    * NOTE: This allows for easier use in CLI mode

* Add delay before removing /media/wktech

* Adjusted TMP_DIR in build-wk

* Fixed path to custom repo

* Trimming the fat
  * hostname / hosts now configured by customize_airootfs.sh
  * removed files from etc that were at default settings
  * removed grml zsh config since oh-my-zsh/lean is used

* Defined a LOG_DIR for build-wk

* Introducing libinput
  * Switched to libinput over synaptics as it has been deprecated.
    * Should restore touchpad functionality going forward.
* Full mount path SHOULD now be displayed for mount-all-volumes.

* Added CLI Screensavers

* diag-network works now
  * network connection tests now passes all ipv4 private ip ranges
    * 10.0.0.0/8, 172.16.0.0/12, & 192.168.0.0/24
    * need to add ipv6 at some point
  * hw-diag menu flow adjusted

* New hostname and more bugfixes
  * hostname switched to wk-arch
  * ufw package is now installed
  * adjusted upload section of hw-diags

* Added alias for start-wifi

* Booting to CLI mode will autologin wktech
  * When booting to the CLI the motd shows some avail commands
  * Adjusted HW-Diags menu for use in CLI mode
2017-12-06 17:56:10 -08:00

77 lines
2.6 KiB
Text

#
# rules.before
#
# Rules that should be run before the ufw command line added rules. Custom
# rules should be added to one of these chains:
# ufw-before-input
# ufw-before-output
# ufw-before-forward
#
# Don't delete these required lines, otherwise there will be errors
*filter
:ufw-before-input - [0:0]
:ufw-before-output - [0:0]
:ufw-before-forward - [0:0]
:ufw-not-local - [0:0]
# End required lines
# allow all on loopback
-A ufw-before-input -i lo -j ACCEPT
-A ufw-before-output -o lo -j ACCEPT
# quickly process packets for which we already have a connection
-A ufw-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A ufw-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A ufw-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
# drop INVALID packets (logs these in loglevel medium and higher)
-A ufw-before-input -m conntrack --ctstate INVALID -j ufw-logging-deny
-A ufw-before-input -m conntrack --ctstate INVALID -j DROP
# ok icmp codes for INPUT
-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT
-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
# ok icmp code for FORWARD
-A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type source-quench -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT
# allow dhcp client to work
-A ufw-before-input -p udp --sport 67 --dport 68 -j ACCEPT
#
# ufw-not-local
#
-A ufw-before-input -j ufw-not-local
# if LOCAL, RETURN
-A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN
# if MULTICAST, RETURN
-A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN
# if BROADCAST, RETURN
-A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN
# all other non-local packets are dropped
-A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny
-A ufw-not-local -j DROP
# allow MULTICAST mDNS for service discovery (be sure the MULTICAST line above
# is uncommented)
-A ufw-before-input -p udp -d 224.0.0.251 --dport 5353 -j ACCEPT
# allow MULTICAST UPnP for service discovery (be sure the MULTICAST line above
# is uncommented)
-A ufw-before-input -p udp -d 239.255.255.250 --dport 1900 -j ACCEPT
# don't delete the 'COMMIT' line or these rules won't be processed
COMMIT