40 lines
506 B
Markdown
40 lines
506 B
Markdown
# Iptables Log parser
|
|
|
|
## How To
|
|
|
|
### Build
|
|
|
|
```c=
|
|
mkdir lib
|
|
#Compile the library
|
|
make parse_lib.so
|
|
```
|
|
|
|
### Execute
|
|
|
|
```bash=
|
|
./wrapper.py
|
|
|
|
```
|
|
|
|
## Structure
|
|
|
|
### wrapper.py
|
|
|
|
Reads, iptables.log and calls the `lib/parser_lib.so`. Feed the parser library with lines from iptables log.
|
|
|
|
### lib/parser_lib.so
|
|
|
|
Process the sed like operation on the line by line feeded by `wrapper.py`.
|
|
|
|
Current parsed values are :
|
|
|
|
- Source IP
|
|
- Destination IP
|
|
- Packet Length
|
|
- Interface IN
|
|
- Interface OUT
|
|
- Protocol
|
|
|
|
|