Skip to content

Commit

Permalink
Added iptables/ip6tables rules
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJokr committed Apr 3, 2020
1 parent 0917abe commit 9099ad5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tcpreq-ipt.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Delete afterwards with:
# ip(6)tables -D OUTPUT -p tcp --sport 49152: -j tcpreq
# ip(6)tables -F tcpreq
# ip(6)tables -X tcpreq
# The tcpreq chain filters all TCP segments from the ports used
# by tcpreq unless the socket was created by the user with ID 1001
# Whitelisting is necessary because the kernel skips owner checks
*filter
:OUTPUT ACCEPT
:tcpreq -
-A OUTPUT -p tcp --sport 49152: -j tcpreq
-A tcpreq -m owner --uid-owner 1001 -j ACCEPT
-A tcpreq -j DROP
COMMIT

0 comments on commit 9099ad5

Please sign in to comment.