Page 1 of 1

Iptables always shows Uptime: 0 minutes

Posted: Mon Oct 19, 2020 10:19 am
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.

Re: Iptables always shows Uptime: 0 minutes

Posted: Mon Oct 19, 2020 11:49 am
by myVesta
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

Re: Iptables always shows Uptime: 0 minutes

Posted: Mon Oct 19, 2020 12:11 pm
by thambyz
It Works. Thank you.

Re: Iptables always shows Uptime: 0 minutes

Posted: Wed Nov 30, 2022 2:15 pm
by linuxman
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!

Re: Iptables always shows Uptime: 0 minutes

Posted: Mon Dec 05, 2022 4:20 pm
by linuxman
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?