Linulex
Silver Pleskian
Hello all,
I have a server that is blacklisted because a website makes connection with a bot. I want stop this offcourse, but i need to find wich website it is. It use to be as simple as login outgoing connections and the uid would show up in the log after a while.
iptables -I OUTPUT 1 -p tcp -m tcp -d xxx.xxx.xxx.xxx --dport 80 -j LOG --log-level 1 --log-uid
BUT ... when using nginx as proxy, the logs always show the uid of nginx, not of the system user of the website.
All i get now is
Apr 16 11:01:53 res5 kernel: IN= OUT=bond0 SRC=xxx.xxx.xxx.xxx DST=xxx.xxx.xxx.xxx LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=64667 DF PROTO=TCP SPT=80 DPT=51448 WINDOW=165 RES=0x00 ACK URGP=0 UID=497 GID=498
497 = nginx, it doesn't log the system user anymore that goes with the website.
Does anyone knows a way to log outgoing connections that will give me the system uid?
Maybe in nginx or apache.
regards
Jan
I have a server that is blacklisted because a website makes connection with a bot. I want stop this offcourse, but i need to find wich website it is. It use to be as simple as login outgoing connections and the uid would show up in the log after a while.
iptables -I OUTPUT 1 -p tcp -m tcp -d xxx.xxx.xxx.xxx --dport 80 -j LOG --log-level 1 --log-uid
BUT ... when using nginx as proxy, the logs always show the uid of nginx, not of the system user of the website.
All i get now is
Apr 16 11:01:53 res5 kernel: IN= OUT=bond0 SRC=xxx.xxx.xxx.xxx DST=xxx.xxx.xxx.xxx LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=64667 DF PROTO=TCP SPT=80 DPT=51448 WINDOW=165 RES=0x00 ACK URGP=0 UID=497 GID=498
497 = nginx, it doesn't log the system user anymore that goes with the website.
Does anyone knows a way to log outgoing connections that will give me the system uid?
Maybe in nginx or apache.
regards
Jan