After xcompmgr got crashed by gksu application, so i decided to change my firewall application from gufw > ufw > iptables to shorewall. Why? because this doesn’t need many dependencies, even this setup manually but this more easy than the gufw, i think 🙂 so this my simple tutorial :
NB : using archlinux
1. Install shorewall, this must been already exist on your repository. install shorewal based on your distribution. On archlinux : Â sudo pacman -S shorewall
2. Now we need to stop all daemon which using iptables, and the iptables it self, once again to stop this daemon, based on your system. Archlinux : sudo /etc/rc.d/ufw stop; sudo /etc/rc.d/iptables stop
3. Now you need to copy the shorewall config files to /etc/shorewall/
4. sudo cp /usr/share/doc/shorewall/Samples/Universal/ /etc/shorewall
5. Then you can start shorewall manually. archlinux : sudo /etc/rc.d/shorewall start
6. If  it’s tell [DONE], congrats you have shorewall run.
configuration on shorewall is quite easy,
7. clear all default shorewall config.
8. #shorewall clear
9. Open /etc/shorewall/rules with your favourites text editor and with root permission. then the files will contain like this.
#ACTION SOURCE DESTINATION PROTO DEST PORT(S) <macro>(ACCEPT) net $FW
What is macro? macro is keyword used by shorewall.
listing macro
$ ls /usr/share/shorewall/macro.*
then you will see many list, example Squid
squid(ACCEPT) net $FW
then restart your shorewall
#/etc/rc.d/shorewall restart
That is a simple guide. Furthermore with custom ports or protocols look hereÂ