Iptables always shows Uptime: 0 minutes

Post Reply
thambyz
Posts: 10
Joined: Fri Sep 25, 2020 8:47 am
Iptables always shows Uptime: 0 minutes

Post by thambyz »

Hi,
If i go to Server Tab, iptables section always shows CPU: 0, Memory: 0 mb, Uptime: 0 minutes. How can i confirm if it is working properly or not.

Thank you.

User avatar
dpeca
Site Admin
Posts: 236
Joined: Fri Jun 19, 2020 9:59 am
Location: Serbia, Niš
Re: Iptables always shows Uptime: 0 minutes

Post by dpeca »

Because actually it's not a service.
And it's normal to show uptime 0.

To check if it's active, in SSH, as root, run:

Code: Select all

iptables -L
You should see something like this:

Code: Select all

Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  YOUR-SERVER-HOSTNAME  anywhere
ACCEPT     all  --  localhost            anywhere
ACCEPT     tcp  --  YOUR-SERVER-HOSTNAME  anywhere             tcp dpt:8083
ACCEPT     tcp  --  anywhere             anywhere             multiport dports http,https
ACCEPT     tcp  --  anywhere             anywhere             multiport dports ftp,12000:12100
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             multiport dports smtp,urd,submission,2525
ACCEPT     tcp  --  anywhere             anywhere             multiport dports pop3,pop3s
ACCEPT     tcp  --  anywhere             anywhere             multiport dports imap2,imaps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8083
ACCEPT     icmp --  anywhere             anywhere
if you have fail2ban, on the top you will probably see:

Code: Select all

f2b-sshd   tcp  --  anywhere             anywhere             multiport dports ssh
fail2ban-VESTA  tcp  --  anywhere             anywhere             tcp dpt:8083
fail2ban-MAIL  tcp  --  anywhere             anywhere             multiport dports smtp,urd,submission,2525,pop3,pop3s,imap2,imaps
fail2ban-SSH  tcp  --  anywhere             anywhere             tcp dpt:ssh

thambyz
Posts: 10
Joined: Fri Sep 25, 2020 8:47 am
Re: Iptables always shows Uptime: 0 minutes

Post by thambyz »

It Works. Thank you.


Post Reply