{"id":18728708,"url":"https://github.com/rubyonworld/netfilter-rb","last_synced_at":"2026-05-02T01:34:56.945Z","repository":{"id":174008013,"uuid":"540253175","full_name":"RubyOnWorld/netfilter-rb","owner":"RubyOnWorld","description":"netfilter.rb is a Ruby Library/DSL for writing Linux Netfilter/iptables firewall rules.","archived":false,"fork":false,"pushed_at":"2022-09-23T02:44:54.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T20:32:45.222Z","etag":null,"topics":["dsl","firewall","linux","netfilter","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-23T02:44:40.000Z","updated_at":"2023-05-12T17:09:32.000Z","dependencies_parsed_at":"2024-01-28T04:21:26.630Z","dependency_job_id":null,"html_url":"https://github.com/RubyOnWorld/netfilter-rb","commit_stats":null,"previous_names":["rubyonworld/netfilter-rb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubyOnWorld/netfilter-rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fnetfilter-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fnetfilter-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fnetfilter-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fnetfilter-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/netfilter-rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fnetfilter-rb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32520156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"ssl_error","status_checked_at":"2026-05-02T01:12:54.261Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dsl","firewall","linux","netfilter","ruby"],"created_at":"2024-11-07T14:23:51.894Z","updated_at":"2026-05-02T01:34:56.933Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Netfilter.rb\n\nnetfilter.rb is a Ruby Library/DSL for writing Linux\nNetfilter/iptables firewall rules.\n\nIt's currently in alpha status - a proof of concept that I'm writing\nrspecs for to start developing (and using) it properly.\n\n= Example use\n\n  require 'lib/netfilter.rb'\n  include Netfilter\n  include Netfilter::Protocols\n\n  filter.input.policy = :drop\n  filter.input.accept :in =\u003e :lo\n  filter.input.accept :state =\u003e :established\n  filter.input.accept :dport =\u003e udp(500,4500)\n  filter.input.accept :protocol =\u003e [:esp, 4, :ah]\n  \n  trusted = filter.new_chain(\"trusted\")\n  open(\"trusted-ips.txt\").readlines.each do |ip|\n\t  trusted.accept :src =\u003e ip\n  end\n  filter.input.jump :dport =\u003e tcp(22, 25, 110, 6667..6669), :chain =\u003e trusted\n  \n  filter.input.with_scope :src =\u003e '66.77.88.99' do\n    accept :dport =\u003e tcp(80)\n    log :prefix =\u003e 'audited: '\n    reject\n  end\n  \n  filter.input.drop :dport =\u003e [tcp(139,445), udp(135..137)]\n  filter.input.log :prefix =\u003e 'INPUT: ', :limit =\u003e '3/s', :burst =\u003e 6\n  \n  render_netfilter\n\n= More Info\n\nAuthor::  John Leach  (mailto:john@johnleach.co.uk)\nCopyright:: Copyright (c) 2010 John Leach\nLicense:: GPL 3.0\nGithub:: http://github.com/johnl/netfilter.rb/tree/master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fnetfilter-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fnetfilter-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fnetfilter-rb/lists"}