Fli
11-07-2015, 12:38 AM
When i want Linux server not to contain the IP from which i accessed it, how to go about that?
my idea is:
grep -Ril "myIPhere" /
this way search thru all files and print paths to files which contains my IP in them
then process these files to remove IPs or make some files immutable if that is safe for that file
Example cron:
* * * * * root history -c;echo >~/.bash_history;echo >/var/log/wtmp; echo > /var/log/btmp;>/var/log/lastlog;>/var/log/secure
that should empty history and last logins each minute
my idea is:
grep -Ril "myIPhere" /
this way search thru all files and print paths to files which contains my IP in them
then process these files to remove IPs or make some files immutable if that is safe for that file
Example cron:
* * * * * root history -c;echo >~/.bash_history;echo >/var/log/wtmp; echo > /var/log/btmp;>/var/log/lastlog;>/var/log/secure
that should empty history and last logins each minute