PYROMAN(8)

πŸ’– PYROMAN(8) πŸ’–

okay so bestie, welcome to pyroman β€” it's a firewall configuration utility, and it lives in the System Manager's Manual. sit down, grab a boba, we're gonna set up IP packet filtering together and it's gonna be iconic πŸ’…


✨ SYNOPSIS ✨

pyroman
       [ -hvnspP ] [ -r RULESDIR ] [ -t SECONDS ]
       [ --help ] [ --version ] [ --safe ] [ --no-act ]
       [ --print ] [ --print-verbose ] [ --rules=RULESDIR ]
       [ --timeout=SECONDS ] [ safe ]

πŸ¦‹ DESCRIPTION πŸ¦‹

pyroman is a firewall configuration utility, periodt.

The way that it works is: it compiles a whole set of configuration files into iptables statements, so it can set up IP packet filtering for you. no cap, it just does it. 🫢

ngl, you can operate and use Pyroman without this, but bestie... you should really already understand how IP, TCP, UDP, ICMP and the other commonly used Internet protocols work and interact. and you should also have the basics of iptables down, otherwise you can't use the full functionality. it's giving "read the room first" 😭

here's the vibe though: pyroman does not try to hide all the iptables complexity from you. instead it tries to give you a convenient way of managing a complex network's firewall. for that, it offers a compact syntax to add new firewall rules, while still exposing access to add arbitrary iptables rules. best of both worlds fr fr πŸ‘‘


🌸 OPTIONS 🌸

  • -r RULESDIR, --rules=RULES β€” load the rules from directory RULESDIR instead of the default directory (usually /etc/pyroman) πŸ“‚
  • -t SECONDS, --timeout=SECONDS β€” wait SECONDS seconds after applying the changes for the user to type OK to confirm he can still access the firewall. this implies --safe, but it lets you use a different timeout. ⏳
  • -h, --help β€” print a summary of the command line options and exit. classic. ✨
  • -V, --version β€” print the version number of pyroman and exit. πŸ’œ
  • -s, --safe, safe β€” when the firewall was committed, wait 30 seconds for the user to type OK to confirm that he can still access the firewall (i.e. the network connection wasn't blocked by the firewall). otherwise, the firewall changes will be undone, and the firewall will be restored to the previous state. use the --timeout=SECONDS option to change the timeout. 🚨
not me stressing β€” this is the "did I just lock myself out" safety net and it's lowkey the most important flag here πŸ’€
  • -n, --no-act β€” don't actually run iptables. this can be used to check if pyroman accepts the configuration files. perfect lil dress rehearsal πŸŽ€
  • -p, --print β€” instead of running iptables, output the generated rules. πŸ‘€
  • -P, --print-verbose β€” instead of running iptables, output the generated rules. each statement will have one comment line explaining how this rule was generated. this will usually include the filename and line number, and it's useful for debugging. detective mode activated πŸ”

🧚 CONFIGURATION 🧚

configuration of pyroman consists of a number of files in the directory /etc/pyroman. these files are in python syntax, although bestie you do not need to be a python programmer to use these rules. there is only a small number of statements you need to know, and honestly? it's a short list:

  • add_host β€” define a new host or network πŸ–₯️
  • add_interface β€” define a new interface (group) πŸ”Œ
  • add_service β€” add a new service alias (note that you can always use e.g. www/tcp to reference the www tcp service as defined in /etc/services) ⭐
  • add_nat β€” define a new NAT (Network Address Translation) rule πŸ”„
  • allow β€” allow a service, client, server combination βœ…
  • reject β€” reject access for this service, client, server combination πŸ™…
  • drop β€” drop packets for this service, client, server combination πŸ’€
  • add_rule β€” add a rule for this service, client, server and target combination 🎯
  • iptables β€” add an arbitrary iptables statement to be executed at beginning 🏁
  • iptables_end β€” add an arbitrary iptables statement to be executed at the end 🏁

detailed parameters for these functions can be looked up by calling:

cd /usr/share/pyroman
pydoc ./commands.py

iykyk β€” go read the docs, they're right there πŸ’–


πŸ™ˆ BUGS πŸ™ˆ

None known as of pyroman-0.4 release. (not a single one. we're thriving. 🌈)


πŸ‘‘ AUTHOR πŸ‘‘

pyroman was written by Erich Schubert <erich@debian.org> β€” absolute legend, we stan 🫢


πŸ”₯ SEE ALSO πŸ”₯

iptables(8), iptables-restore(8) iptables-load(8)


and that's the whole page bestie, you ate it up πŸ’… this was PYROMAN(8) from the System Manager's Manual, mwah, bye, go firewall something responsibly πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from