≡ Menu

target

HowTo: Linux Rename Files

How do I rename a file under Linux operating systems using command line (bash shell prompt)?
[click to continue…]

Linux iptables: Port Redirection Example

How do I redirect 80 port to 8123 using iptables?
[click to continue…]

Iptables: Unblock / Delete an IP Address Listed in IPtables Tables

I am a brand new user of a Linux iptables and I can’t find how to instruct my iptables to delete or unblock an IP address listed in iptables firewall. I’m using Debian Linux version. Can you help please?
[click to continue…]

Linux Find FC ID (WWN) of a disk/LUN

How do I find the FC ID (WWN) of a disk/LUN on Linux server?
[click to continue…]

UNIX mv Command Examples

How do I use mv command to rename or move file under UNIX operating systems?
[click to continue…]

FreeBSD iSCSI Initiator Installation and Configuration

Q. How do I install and configure iSCSI initiator service under FreeBSD server?
[click to continue…]

Linux Rescan HP Smart Array For New Disks

How do I rescan an HP Smart Array for new disks without rebooting in CentOS or Debian or RHEL server?
[click to continue…]

Linux Firewall: Display Status and Rules of Iptables Firewall

Q. How do I display / list all rules in the selected chain? How do I find out which rules are active? What is blocked and opened with my firewall?

A. To List all rules in the selected chain use the -L option. If no chain is selected, all chains are listed. As every other iptables command, it applies to the specified table. The -n option help to print IP addresses and port numbers in numeric format.

To check the status of your firewall and all rules, enter:
# iptables -L -n
OR
$ sudo iptables -L -n
Output:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
droplist   all  --  0.0.0.0/0            0.0.0.0/0
droplist   all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  66.228.118.0/23      0.0.0.0/0
DROP       all  --  213.240.4.233        0.0.0.0/0
DROP       all  --  75.126.132.23        0.0.0.0/0
DROP       all  --  80.58.205.35         0.0.0.0/0
.....
...
.....
DROP       all  --  91.200.56.0/22       0.0.0.0/0
LOG        all  --  91.200.72.0/22       0.0.0.0/0           LOG flags 0 level 4 prefix `DROP List Block'
DROP       all  --  91.200.72.0/22       0.0.0.0/0

The –line-numbers option adds line numbers to the beginning of each rule, corresponding to that rule’s position in the chain. The -v option makes the list command show the interface name, the rule options (if any), and the TOS masks. The packet and byte counters are also listed, with the suffix K, M or G for 1000, 1,000,000 and 1,000,000,000 multipliers respectively (but see the -x flag to change this).
# iptables -L -v -n --line-numbers