Nftables
:lipstick: A Sublime Text 3+ syntax definition for your nftables rules
Details
Installs
- Total 466
- Win 140
- Mac 131
- Linux 195
Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Nftables
A Sublime Text 3+ syntax definition for your nftables rules
Introduction
nftables should now be the regular way of handling Netfilter rules, and I was surprised not to find any syntax definition for Sublime Text.
This project aims to provide a “basic” one, as long as a building procedure for GNU/Linux users (when the nft
binary is available for “dynamic” syntax checks).
This project has been inspired by the official nano syntax definition.
See the Scripting nftables Wiki page for external reference.
Installation
With Package Control
- Open your command palette and type in :
Package Control: Install Package
- Browse the list or search for
Nftables
- Press
Enter
and you're done !
Package Control dedicated page here.
Manually
- Move into Sublime Text packages folder (usually
$HOME/.config/sublime-text/Packages/
or%AppData%\Sublime Text\Packages\
) - Clone this repository there :
git clone https://github.com/HorlogeSkynet/Nftables.git
- Restart Sublime Text and… :tada:
Usage
Syntax
Open your command palette and type in :
Set Syntax: Nftables
Click on the bottom-right corner :
Nftables
View > Syntax > Nftables
Build
Open your command palette and type in :
Build With: Nftables
Press
CTRL + B
Tools > Build
Formats currently supported
- [X] nftables output
- [X] scripted configuration
Frequently Asked Questions
Do you plan to support the whole nftables syntax ?
No, but feel free to contribute.
Why does this syntax coloration s*cks ?
Well, sorry to hear that. Grammar wasn't my favorite course at school.
I'd be pleased to review any issue or pull request.
Why didn't you convert the official Bison parser to Sublime's definition syntax ?
It looks like such a tool does not exist (yet ?).
Would this plugin help me building a secure fire-wall ?
No, but I would advise you this blog post as a well-explained starting point, written by @tasn.
I've noticed you got an extensive tests suite, can I run it ?
Of course, open the
Nftables.sublime-syntax
file, pressCTRL + Shift + B
and chooseBuild With: Syntax Tests
.