Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2013
    Location
    Mirigama
    Posts
    30

    How to disable PORT 25 in Virtualizor?

    Hi there,

    Do you have any idea how to disable 25 port on all vps in a dedicated server?

    and what methods do you use to monitor emails/spam activities from a VPS?
    Reliable Web Hosting Sri Lanka Provider & Authorized LK Domains Agent since 2013.
    Shared Hosting | Reseller Packages | Linux KVM VPS | Dedicated Servers | LK Domains

  2. #2
    Join Date
    Mar 2009
    Location
    CA
    Posts
    9,350
    It looks like Virtualizor has hooks available, which you can customize after the VPS has been created but not started. You could potentially have a developer look into creating a hook for the "after_createvps" hook to perform this - or check if Virtualizor support has any available hooks available to accomplish what you're after.

    https://www.virtualizor.com/docs/developers/hooks/
    〓〓 RackNerd LLC - Introducing Infrastructure Stability
    〓〓 Dedicated Servers, Private Cloud, DRaaS, Colocation, VPS, DDoS Mitigation, Shared & Reseller Hosting
    〓〓 www.linkedin.com/in/dustincisneros/
    〓〓 My fancy email dustin@racknerd.com

  3. #3
    Join Date
    Apr 2013
    Location
    Mirigama
    Posts
    30
    Thank you Dustin. I will check their documentation for further more.
    Reliable Web Hosting Sri Lanka Provider & Authorized LK Domains Agent since 2013.
    Shared Hosting | Reseller Packages | Linux KVM VPS | Dedicated Servers | LK Domains

  4. #4
    Hello,

    Virtualizor uses linux’s iptables to manage the server firewall. The Firewall API allows you to manage the server firewall where you can perform multiple operations such as blocking/allowing ports and restarting firewall and much more.

  5. #5
    Hi,
    You can disable on iptables or your Linux OS firewalld.If the server and switch belong to you, you can completely close port 25 by entering a few rules directly on the switch.

  6. #6
    Join Date
    Jun 2011
    Location
    USA/UK/SG
    Posts
    3,636
    I'm not usually a fan of bumping old threads, and I'm assuming the OP already has an answer here, but for the sake of future onlookers (and helping providers to combat spam), here's a good method for OpenVZ 7 (well tried, tested, and in use to this day):

    First off, block port 25 outbound globally (inbound intentionally unaffected):

    Code:
    iptables -A FORWARD -o br0 -p tcp --dport 25 -j DROP
    Then, if someone has a legitimate use case for port 25, have them contact you with valid justification, and open it for their VPS IP(s) only:

    Code:
    iptables -I FORWARD 1 -s 192.168.1.1 -p tcp -m tcp --dport 25 -j ACCEPT
    Of course, make sure to replace 192.168.1.1 with the VPS IP address.

    The only thing you need to consider is what happens when the VPS is terminated (i.e. customer cancels), you'll need to figure out an internal process to address that.

    OP didn't specify what virtualization they were using, and the process can vary from platform to platform, so this may or may not be relevant for those who aren't running OpenVZ 7. With KVM there are other methods, such as using the VPS MAC address to filter ports.
    ~]# Ethernet Servers Ltd - Est. 2014! - sales @ ethernetservers.com
    ~]# Try out our WordPress speed tests for yourself!
    ~]# NVMe Web Hosting | Unmanaged VPS | Fully Managed VPS | Dedicated Servers | Domain Names
    ~]# Don't settle for any less than the very best - come & join our family today!

  7. #7
    Join Date
    Mar 2007
    Posts
    2,050
    Quote Originally Posted by sajithgsm View Post
    Hi there,

    Do you have any idea how to disable 25 port on all vps in a dedicated server?

    and what methods do you use to monitor emails/spam activities from a VPS?
    Drop all traffic on your external firewall, if you do not have an external firewall on the host and do a pre setup on the VPS, though do not rely on it being enabled on the VPS to enforce this as you need to block this at the host or network level.

    In terms of spam filtering you can use purchased software, open source solutions or 3rd party services.

Similar Threads

  1. How to disable server status in CPanel?
    By labahost in forum Hosting Software and Control Panels
    Replies: 6
    Last Post: 11-05-2005, 04:41 PM
  2. How to forward port 25 on Cisco Pix 501?
    By DaveNET in forum Hosting Security and Technology
    Replies: 1
    Last Post: 06-09-2005, 09:09 PM
  3. How to disable memory usage in WHM ?
    By BaddaBing in forum Hosting Security and Technology
    Replies: 10
    Last Post: 04-01-2004, 07:12 PM
  4. How to disable email facility in a hosting plan
    By Chang Lee in forum Reseller Hosting
    Replies: 3
    Last Post: 05-26-2002, 07:01 AM
  5. how to disable refresh button in browsers
    By dragonhawk in forum Web Hosting Lounge
    Replies: 7
    Last Post: 04-25-2002, 03:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •