This website works better with JavaScript.
Home
Explore
Help
Sign In
RuhNetConsulting
/
iptables-api
mirror of
https://github.com/palner/iptables-api
Watch
1
Star
0
Fork
0
Code
Issues
0
Projects
0
Releases
5
Wiki
Activity
Browse Source
arm, kamailio example
pull/1/head
Fred Posner
4 years ago
parent
e70e56377c
commit
1547d86990
No known key found for this signature in database
GPG Key ID:
ABAD515F42AE1A40
2 changed files
with
21 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+21
-0
README.md
BIN
iptables-api-arm
+ 21
- 0
README.md
View File
@ -51,6 +51,27 @@ cat > /etc/logrotate.d/iptables-api << EOF
EOF
```
## Kamailio Example
```bash
loadmodule "http_client.so"
loadmodule "htable.so"
...
modparam("htable", "htable", "ipban=>size=8;autoexpire=600;")
...
if (!pike_check_req()) {
xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");
$sht(ipban=>$si) = 1;
http_client_query("http://localhost:8082/addip/$si", "$var(apinfo)");
exit;
}
...
event_route[htable:expired:ipban] {
xlog("mytable record expired $shtrecord(key) => $shtrecord(value)\n");
http_client_query("http://localhost:8082/removeip/$shtrecord(key)", "$var(apinfo)");
}
```
## License / Warranty
iptables-api is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version
BIN
iptables-api-arm
View File
Write
Preview
Loading…
Cancel
Save