Iptables always shows Uptime: 0 minutes

Post Reply
thambyz
Posts: 10
Joined: Fri Sep 25, 2020 8:47 am

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
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

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

It Works. Thank you.
User avatar
linuxman
Posts: 2
Joined: Mon Nov 21, 2022 4:21 pm

Hello, my iptables show ok

Code: Select all

f2b-sshd   tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 22
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 25,465,587,2525,110,995,143,993
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 25,465,587,2525,110,995,143,993
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 25,465,587,2525,110,995,143,993
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 21,12000
f2b-sshd   tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
ACCEPT     all  --  83.212.108.20        0.0.0.0/0           
ACCEPT     all  --  127.0.0.1            0.0.0.0/0           
ACCEPT     tcp  --  62.105.41.93         0.0.0.0/0            tcp dpt:10000
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:2222
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 80,443
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:53
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:53
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 3306,5432
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8083
But I not see the service on myVestaCP show up and I not found if it work or not.
Can you suggest something ?
My system :
Debian GNU/Linux 11 (bullseye)
myVesta 0.9.8-26-58
Build date: 26-Nov-2022

P.S. With this situation I see the myVesta have Firewall and open open ports but is not applied to iptables !
With my other server on Debian 10 is worked fine!
Attachments
iptables.png
iptables.png (61.67 KiB)
Last edited by linuxman on Wed Nov 30, 2022 2:20 pm, edited 1 time in total.
User avatar
linuxman
Posts: 2
Joined: Mon Nov 21, 2022 4:21 pm

Hello,
I update the problem with iptables:
I reinstall the server With Debian 10 and myVestaCP
iptables service in list of server look ok.

And I have one question.
If I install arno-iptables-firewall instead the default firewall, the default firewall need to be clear or disable?
Attachments
iptables-deb10.png
iptables-deb10.png (68.25 KiB)
Post Reply