Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

[SOLVED] Add Firewall Rules via Vesta CLI

General questions about VestaCP
Locked
  • Print view
Advanced search
8 posts • Page 1 of 1
mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
[SOLVED] Add Firewall Rules via Vesta CLI

Post by mehargags » Wed Apr 01, 2015 9:28 am

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 ?
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Add Firewall Rules via Vesta CLI

Post by skurudo » Thu Apr 02, 2015 7:48 pm

/usr/local/vesta/bin/v-add-firewall-rule

# info: add firewall rule
# options: ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Add Firewall Rules via Vesta CLI

Post by mehargags » Thu Jan 07, 2016 3:38 am

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 ??
Top

BBuchanan1013
Posts: 139
Joined: Thu Jan 07, 2016 12:01 am

Re: Add Firewall Rules via Vesta CLI

Post by BBuchanan1013 » Thu Jan 07, 2016 5:37 am

skurudo wrote:/usr/local/vesta/bin/v-add-firewall-rule

# info: add firewall rule
# options: ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
I would assume:

Code: Select all

/usr/local/vesta/bin/v-add-firewall-rule allow 0.0.0.0/0 8813 TCP BHS-port any
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Add Firewall Rules via Vesta CLI

Post by mehargags » Thu Jan 07, 2016 5:03 pm

Thanks.

What is the "RULE" part actually ? I don't see any such field in the VestaCP firewall section
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Add Firewall Rules via Vesta CLI

Post by skurudo » Thu Jan 07, 2016 10:09 pm

mehargags wrote: What is the "RULE" part actually ? I don't see any such field in the VestaCP firewall section
It's number, just a number - see in /usr/local/vesta/data/firewall/rules.conf
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'
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Add Firewall Rules via Vesta CLI

Post by mehargags » Sat Jan 09, 2016 6:03 am

Thanks -- I got it
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: [SOLVED] Add Firewall Rules via Vesta CLI

Post by skurudo » Tue Jan 12, 2016 10:36 am

Ok, close ;-)
Top


Locked
  • Print view

8 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password