{"repo":"netkiller/firewall","free":true,"listed":false,"github":"https://github.com/netkiller/firewall","clone":"git clone https://github.com/netkiller/firewall.git","description":"Python Firewall Library","language":"Python","stars":59,"topics":["firewall","python","shell","systemd-service"],"license":"MIT","category":"cli-tools","readme_excerpt":"firewall ======== Install ------- # cd /usr/local/src/ # yum install -y git python39 # git clone https://github.com/netkiller/firewall.git # cd firewall # bash install.sh Demo ---- $ sudo /etc/init.d/firewall Usage: /etc/init.d/firewall {start stop status restart} $ sudo /etc/init.d/firewall start $ sudo /etc/init.d/firewall status Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 44 6163 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 0 0 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT all -- lo 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 state NEW 0 0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 443,80 state NEW 2 2884 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT 45 packets, 6893 bytes) pkts bytes target prot opt in out source destination 0 0 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 20,21 reject-with icmp-port-unreachable $ sudo /etc/init.d/firewall stop Rule file --------- $ sudo cat /srv/firewall/libexec/www.py #!/usr/bin/env python3 # - - coding: utf-8 - - from firewall import ######################################## # Web Application ######################################## www = Firewall() www.flush() www.policy(www.INPUT,www.ACCEPT) www.policy(www.OU","default_branch":null,"files":null,"tree":[],"storefront":"/r/netkiller","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/netkiller/firewall/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}