Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Display who are currently logged in

Answer:

Type "who" in the command shell

# who

It will display all the users currently logged in.

E.g.

john pts/0 Jan 3 00:36 (232.127.126.23)

What is the command to display the current TCP/IP configuration?

Answer:

Try:

ifconfig -a

Ban a remote IP Address using iptables

Answer:

iptables -A INPUT -s IP -j DROP

Replace IP with the actual remote IP address.

Note that the blocking will be lost when server reboot. You would need to save the rule(s) into a script and reload when server reboot.