Forum Moderators: phranque

Message Too Old, No Replies

block all ports but 80

         

therealgtron

7:52 pm on Feb 25, 2009 (gmt 0)

10+ Year Member



is it possible to block all ports but 80 via .htaccess?

thanks!

jdMorgan

8:13 pm on Feb 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mod_rewrite in .htaccess can block other ports, but only for HTTP requests.

Is your server configured to respond to HTTP requests on additional ports, other than http port 80 and https port 443?

What are you trying to accomplish? What problems are you having?

Jim

therealgtron

8:18 pm on Feb 25, 2009 (gmt 0)

10+ Year Member



thanks for your quick reply!

on one of my vps's i want some accounts to be able to use mail and ftp so i have to leave those services running.

on other accounts i want only httpd and port 80 open.

jdMorgan

8:27 pm on Feb 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mod_rewrite in .htaccess can block other ports, but only for HTTP requests.

Nothing in Apache HTTP Web server is going to affect your mail or FTP servers.

Jim

therealgtron

8:42 pm on Feb 25, 2009 (gmt 0)

10+ Year Member



so is it impossible to block specific ports based on site name?

jdMorgan

8:58 pm on Feb 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might look into setting up hardware or software firewall rules.

Jim

therealgtron

9:41 pm on Feb 25, 2009 (gmt 0)

10+ Year Member



ok thanks