Results 1 to 11 of 11
  1. #1
    Join Date
    Dec 2009
    Posts
    159

    Is it possible to change port 80?

    Hi guys,

    Is there a way of changing port 80 as I understand it is one of the most common ports to be attacked on a dedicated server?

    Any help would be appreciated.

    Thanks
      0 Not allowed!

  2. #2
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,960
    Yes, it is possible. You can edit httpd.conf or whatever web server you are using.

    In cPanel, it is much easier.
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001
      0 Not allowed!

  3. #3
    Join Date
    Dec 2009
    Posts
    159
    Quote Originally Posted by net View Post
    Yes, it is possible. You can edit httpd.conf or whatever web server you are using.

    In cPanel, it is much easier.
    Hi there,

    I know it is much easier in cpanel/whm which I am using on the VPS I am using but the main IP for the server is being used for solusvm and not cpanel/whm. The main OS installation is CentOS 5.

    Any command lines would be useful. The server itself is behind IPTables firewall (Which isn't my favourite firewall installation but it came installed with CentOS).
      0 Not allowed!

  4. #4
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    819
    Quote Originally Posted by tomdorrian View Post
    Hi there,

    I know it is much easier in cpanel/whm which I am using on the VPS I am using but the main IP for the server is being used for solusvm and not cpanel/whm. The main OS installation is CentOS 5.

    Any command lines would be useful. The server itself is behind IPTables firewall (Which isn't my favourite firewall installation but it came installed with CentOS).
    It depends on how Apache was installed on your VPS. If it was installed through an RPM package, you would edit /etc/httpd/conf/httpd.conf.

      0 Not allowed!

  5. #5
    Join Date
    Dec 2009
    Posts
    159
    Quote Originally Posted by CH-Shaun View Post
    It depends on how Apache was installed on your VPS. If it was installed through an RPM package, you would edit /etc/httpd/conf/httpd.conf.
    I have executed this command and the file was blank /etc/httpd/conf/httpd.conf. I don't think apache is installed but apache2 is installed in the cpanel vps.
      0 Not allowed!

  6. #6
    Join Date
    Jul 2009
    Location
    UK
    Posts
    1,308
    Why would you even change it?

    If you have a webserver running then it should be on port 80..

    If you dont have one running, Then firewall the port and shutdown httpd?

    To change the port in apache, vi /etc/httpd/conf/httpd.conf and edit the LISTEN line
    Should be something like ::80
    Live Chat Support Software for your Business website - IMsupporting.com
      0 Not allowed!

  7. #7
    Join Date
    Dec 2009
    Posts
    159
    Quote Originally Posted by lynxus View Post
    Why would you even change it?

    If you have a webserver running then it should be on port 80..

    If you dont have one running, Then firewall the port and shutdown httpd?

    To change the port in apache, vi /etc/httpd/conf/httpd.conf and edit the LISTEN line
    Should be something like ::80
    OK fair enough.

    Port 80 like port 22 is one of the most common attacked ports by hackers and thats why I was looking into having it changed. To secure up my server. If it isn't possible to change this port then I will just leave it as it is.
      0 Not allowed!

  8. #8
    Join Date
    Jun 2002
    Location
    United Kingdom
    Posts
    1,236
    Quote Originally Posted by lynxus View Post
    Why would you even change it?

    If you have a webserver running then it should be on port 80..

    If you dont have one running, Then firewall the port and shutdown httpd?

    To change the port in apache, vi /etc/httpd/conf/httpd.conf and edit the LISTEN line
    Should be something like ::80
    This is 100% correct.

    If you need apache running, eg, have a website hosted on the server, then for people to access your website they would have to go to example.com:8080 if you changed the port to 8080.

    Also, if you do run a site like this.... then bots and automated scripts would soon find the site by crawling through pages and backlinks and it would soon get the same attacks on the new port.

    The only benefit is if it is some private site, not indexed by search engines, that way the port probably wouldn't get discovered so quickly.
      0 Not allowed!

  9. #9
    Join Date
    Jul 2009
    Location
    UK
    Posts
    1,308
    Quote Originally Posted by matt2kjones View Post
    This is 100% correct.

    If you need apache running, eg, have a website hosted on the server, then for people to access your website they would have to go to example.com:8080 if you changed the port to 8080.

    Also, if you do run a site like this.... then bots and automated scripts would soon find the site by crawling through pages and backlinks and it would soon get the same attacks on the new port.

    The only benefit is if it is some private site, not indexed by search engines, that way the port probably wouldn't get discovered so quickly.
    Yep.

    Simply put,
    Port 80 is attacked more because its the most common port.

    As above mentions, If you MUST have a website but ONLY YOU can access it then yeah, change the port.
    But if its needed by joe public, Then it needs to stay on port80.

    Id suggest a few things:
    1 - Ensure your webserver is up to date ( patched )
    2 - Ensure your webapps are patched and the files have the correct permissions.

    99% of all "hacks" on port 80 are due to bad configurations or really bad code on web apps. Its rarely a fault in the webservice itself.

    Also, Moving it to port 8080 or even 12345 etc will not really help too much.
    You will find your server will be port scanned quite often so people will find the port anyway.
    Live Chat Support Software for your Business website - IMsupporting.com
      0 Not allowed!

  10. #10
    Join Date
    Jul 2009
    Location
    UK
    Posts
    1,308
    With regards to port 22..

    You can do a few things to lock this down further...

    1 - Iptables it so you can only connect to port 22 from known IP addresses.
    2 - If (1) isnt possiblem, Setup port knocking so port 22 is closed unless you "knock" a few other ports first
    3 - Enable pre shared keys. IE: you have a private key on your PC and the server has a public key.
    People would then need to know:
    your username
    your password
    your key ( 2048 text file )

    To gain access.
    Live Chat Support Software for your Business website - IMsupporting.com
      0 Not allowed!

  11. #11
    Join Date
    Feb 2006
    Location
    Kusadasi, Turkey
    Posts
    3,273
    OP says he has learned enough
    Fraud Record - Stop Fraud Clients, Report Abusive Customers.
    █ Combine your efforts to fight misbehaving clients.

    HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
    █ Large and awesome portfolio, just visit and see!
      0 Not allowed!

Similar Threads

  1. Email Server Port Problem - How to change/add port for SMTP
    By 0218 in forum Hosting Security and Technology
    Replies: 1
    Last Post: 02-19-2008, 04:46 AM
  2. change port
    By danieln in forum Hosting Security and Technology
    Replies: 2
    Last Post: 05-14-2007, 06:08 AM
  3. Change SSH Port to FTP Port 21
    By jojo235 in forum Hosting Security and Technology
    Replies: 6
    Last Post: 03-22-2005, 06:06 PM
  4. Change Port
    By aashx in forum Hosting Security and Technology
    Replies: 9
    Last Post: 01-10-2005, 11:14 AM
  5. Change port from 80??
    By soontohost in forum Dedicated Server
    Replies: 5
    Last Post: 10-30-2002, 11:50 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
  •