We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
[SOLVED] Add Firewall Rules via Vesta CLI
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
[SOLVED] Add Firewall Rules via Vesta CLI
Hi all,
I was wondering what Will be the Commands to update/Add/Delete any Firewall rules via VestaCP CLI.
For Eg: just after the Vesta install, I'd want Port 8090 open for my specific application. What will be the command ?
I was wondering what Will be the Commands to update/Add/Delete any Firewall rules via VestaCP CLI.
For Eg: just after the Vesta install, I'd want Port 8090 open for my specific application. What will be the command ?
Re: Add Firewall Rules via Vesta CLI
/usr/local/vesta/bin/v-add-firewall-rule
# info: add firewall rule
# options: ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
# info: add firewall rule
# options: ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Add Firewall Rules via Vesta CLI
So What exactly will be the command as per the syntax if I want Add this Firewall rule :
Name of the Rule : BHS-port
Type : ALLOW
port : 8813
for all IPs: 0.0.0.0/0
can you write the exact command line for this please ?
ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
ACCEPT 0.0.0.0/0 8813 TCP BHS-port ??
Name of the Rule : BHS-port
Type : ALLOW
port : 8813
for all IPs: 0.0.0.0/0
can you write the exact command line for this please ?
ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
ACCEPT 0.0.0.0/0 8813 TCP BHS-port ??
-
- Posts: 139
- Joined: Thu Jan 07, 2016 12:01 am
Re: Add Firewall Rules via Vesta CLI
I would assume:skurudo wrote:/usr/local/vesta/bin/v-add-firewall-rule
# info: add firewall rule
# options: ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
Code: Select all
/usr/local/vesta/bin/v-add-firewall-rule allow 0.0.0.0/0 8813 TCP BHS-port any
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Add Firewall Rules via Vesta CLI
Thanks.
What is the "RULE" part actually ? I don't see any such field in the VestaCP firewall section
What is the "RULE" part actually ? I don't see any such field in the VestaCP firewall section
Re: Add Firewall Rules via Vesta CLI
It's number, just a number - see in /usr/local/vesta/data/firewall/rules.confmehargags wrote: What is the "RULE" part actually ? I don't see any such field in the VestaCP firewall section
RULEShow
RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16'
RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='VESTA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT='DB' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='4' ACTION='DROP' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='18:08:53' DATE='2015-12-01'
RULE='5' ACTION='DROP' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='18:08:35' DATE='2015-12-01'
RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'
RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24'
RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16'
RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='10001' IP='0.0.0.0/0' COMMENT='Monit' SUSPENDED='no' TIME='21:03:29' DATE='2015-11-29'
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Add Firewall Rules via Vesta CLI
Thanks -- I got it
Re: [SOLVED] Add Firewall Rules via Vesta CLI
Ok, close ;-)