{"id":13572540,"url":"https://github.com/bmaeser/iptables-boilerplate","last_synced_at":"2026-01-11T06:57:33.785Z","repository":{"id":2920582,"uuid":"3930891","full_name":"bmaeser/iptables-boilerplate","owner":"bmaeser","description":"rock solid default firewall-rules for webhosts","archived":true,"fork":false,"pushed_at":"2020-04-29T14:17:33.000Z","size":34,"stargazers_count":251,"open_issues_count":0,"forks_count":64,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-05T05:34:26.617Z","etag":null,"topics":["debian","firewall","iptables","ubuntu"],"latest_commit_sha":null,"homepage":"http://bmaeser.github.io/iptables-boilerplate","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmaeser.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-04T16:50:09.000Z","updated_at":"2024-08-25T11:39:35.000Z","dependencies_parsed_at":"2022-08-27T02:27:28.060Z","dependency_job_id":null,"html_url":"https://github.com/bmaeser/iptables-boilerplate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmaeser%2Fiptables-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmaeser%2Fiptables-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmaeser%2Fiptables-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmaeser%2Fiptables-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmaeser","download_url":"https://codeload.github.com/bmaeser/iptables-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247160203,"owners_count":20893790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian","firewall","iptables","ubuntu"],"created_at":"2024-08-01T14:01:26.284Z","updated_at":"2026-01-11T06:57:33.714Z","avatar_url":"https://github.com/bmaeser.png","language":"Shell","funding_links":[],"categories":["Shell","Security"],"sub_categories":[],"readme":"# project unmaintained!\n\nuse with caution\n\n# iptables-boilerplate\nrock solid default firewall-rules for webhosts\n\n## What is this?\niptables-boilerplate is a set of predefined firewall rules that are typically used on \"webhosts\".\nits not a set of rules, designed to secure your home or office-network or to setup a router or gatweay.\nthink of \"lamp\"-servers.\n\n#### iptables-boilerplate is tested on\n* Debian 7.0 / Wheezy\n* Debian 8.0 / Jessie\n* Debian 9.0 / Stretch\n* Ubuntu 14.04 LTS / Trusty\n* Ubuntu 16.04 LTS / Xenial\n\nwe will support every LTS (Ubuntu) and stable (Debian) version.\n\n#### Features\n* rock solid defaults\n* easy extendable\n* one-line opening ports\n* one line whitelisting ips\n* one line blacklisting ips\n* extensively documented (inline comments)\n\n## Installation\n\n### Easy Install\nOn Ubuntu and Debain you can use `make` to install or uninstall.\n\nMake sure `make` is installed:\n\n    sudo apt-get install make\n\nAnd follow these steps to install:\n\n    git clone git://github.com/bmaeser/iptables-boilerplate.git\n    cd iptables-boilerplate\n    sudo make\n\nTo uninstall run:\n\n    sudo make uninstall\n\n### On other systems\n\ncreate necessary directories first\n    \n    sudo mkdir /etc/firewall\n    sudo mkdir /etc/firewall/custom\n\ncheckout the github repo and install the files\n\n    git clone git://github.com/bmaeser/iptables-boilerplate.git\n    cd iptables-boilerplate\n    sudo cp firewall /etc/init.d/firewall\n    cd etc/firewall/\n    sudo cp *.conf /etc/firewall/\n    \nmake sure firewall is executable and update runnlevels\n\n    sudo chmod 755 /etc/init.d/firewall\n    sudo update-rc.d firewall defaults\n    \n## Configuration\n\nAll configuration-files are to be found at /etc/firewall/\n\nFeel free to read the firewall-script itself and comment/uncomment what you like or dislike.\n\n#### firewall.conf\nMain firewall configfile. All settings are on sane defaults, you really should know what you do\nif you change them.\n\n#### services.conf\nThis file is used to open ports for services like ssh or http(s) in your firewall.\n\n###### SYNTAX:\n\nPORT/PROTOCOLL SOURCE\nwhere SOURCE is the source ip or network\n\nn.n.n.n/m - Where n.n.n.n is the IP address range and m is the bitmask.\n\nif SOURCE is empty it defaults to 0.0.0.0/0 (which is any IP)\n\n###### EXAMPLEs:\n\nopens ports for SSH for IP 192.168.0.1:\n\n    22/tcp 192.168.0.1\n    22/udp 192.168.0.1\n\nopens ports for HTTP for any IP\n\n    80/tcp 0.0.0.0/0\n\nopens ports for HTTPS for any IP\n\n    443/tcp\n\n#### ip-whitelist.conf:\nAdd all source IPs you want to have full access to this host.\nOne IP per line\n\n###### SYNTAX:\n\nn.n.n.n/m.m.m.m  - Where n.n.n.n is the IP address range and m.m.m.m is the netmask.\n\nn.n.n.n/m - Where n.n.n.n is the IP address range and m is the bitmask.\n\n###### EXAMPLEs:\n\n    192.168.0.1\n    192.168.1.0/8\n    192.168.55.0/255.255.255.148\n    \n#### ip-blacklist.conf:\nAdd all source IPs you want to COMPLETELY BLOCK\nOne IP per line\n\n###### SYNTAX:\n\nn.n.n.n/m.m.m.m  - Where n.n.n.n is the IP address range and m.m.m.m is the netmask.\n\nn.n.n.n/m - Where n.n.n.n is the IP address range and m is the bitmask.\n\n###### EXAMPLEs:\n\n    192.168.0.1\n    192.168.1.0/8\n    192.168.55.0/255.255.255.148\n    \n#### custom/*:\nEvery file/script you place here will be executed during firewall-start.\nPlace your custom rules in here.\n\nThere are some usefull examples in ./custom-examples/ that limit the ammount of new and overall connections.\n\n## Usage\nIf you updated your runlevels, the firewall starts every time you boot your system.\nHowever, you can manually start/stop/restart, e.g. to update changed settings.\n\n    /etc/init.d/firewall (start|stop|restart|reload|force-reload|status)\n\n* start: starts the firewall\n* stop: stops the firewall\n* restart, reload, force-reload: restarts the firewall (all three the same)\n* status: print out the status of the firewall, shows all entries in iptables\n* version: print out the version of iptables-boilerplate\n\n## How to contribute\nfork + hack + pull request please :-)\n\nthx\n\n\n## Licence\nThe MIT License (MIT)\nCopyright © Bernhard Mäser(http://bmaeser.io) and contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmaeser%2Fiptables-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmaeser%2Fiptables-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmaeser%2Fiptables-boilerplate/lists"}