PDA

View Full Version : How to make sure Linux server is free from my IP address?



Fli
11-06-2015, 11:38 PM
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

gexacor
07-10-2016, 08:47 AM
You can use another Linux server as a proxy to access that server instead of edit all log files :)

For example, you can create a temp VPS at any hoster, create the SSH tunnel to it and then connect to the target server using your temporary Linux server IP address instead of your.
Then you can waste your temp server as well.

Take a look here (https://serversuit.com/community/technical-tips/view/things-to-do-with-ssh-ssh-tunneling.html) for example of SSH tunnel configuring and using.