A Linux netfilter module to aid in (d)dos protection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
771 B

CFLAGS = -O2 -Wall
LIBS = libxt_ts3init.so libxt_ts3init_get_cookie.so libxt_ts3init_get_puzzle.so libxt_TS3INIT_RESET.so libxt_TS3INIT_SET_COOKIE.so libxt_TS3INIT_GET_COOKIE.so
all: $(LIBS)
clean:
rm -f $(LIBS)
install:
if [ -d /lib/xtables ]; then \
install -g root -o root -m 644 $(LIBS) /lib/xtables/ ; \
elif [ -d /usr/lib/x86_64-linux-gnu/xtables ]; then \
install -g root -o root -m 644 $(LIBS) /usr/lib/x86_64-linux-gnu/xtables; \
elif [ -d /usr/lib/i386-linux-gnu/xtables ]; then \
install -g root -o root -m 644 $(LIBS) /usr/lib/i386-linux-gnu/xtables; \
else \
echo "Unable to find xtables modules path!"; \
exit 1; \
fi
lib%.so: lib%.o
gcc -shared -fPIC -o $@ $^;
lib%.o: lib%.c
gcc ${CFLAGS} -D_INIT=lib$*_init -fPIC -c -o $@ $<;