iptables for a2billing

Discussion in 'General' started by Centar, Sep 20, 2010.

  1. Centar

    Joined:
    Jan 10, 2010
    Messages:
    99
    Likes Received:
    0
    Has any one set up iptables for a2billing?
    I want to restrict outside wan access to only the /a2customer and /a2billing/signup pages ONLY using iptables INPUT chain but cannot find the proper settings or even if it can be done.
    Can iptables be specific on directories able to be accessed?

    I have no need for fail2ban as I accept NO SIP connections.

    htaccess wouldn't help much in my situation either as I don't want LAN security and want public access to just 2 directories on my server for my customers.

    I also do not want admin wan access, just leave it to local LAN only which is physically secure here.

    and I do not want to use an external firewall solution, rather have it all on 1 box.
     
  2. bucasia

    Joined:
    Feb 15, 2009
    Messages:
    36
    Likes Received:
    0
    Iptables is only for blocking IP addresses and ports.

    To restrict access to certain web pages it is htaccess you want to be looking at.
     
  3. Centar

    Joined:
    Jan 10, 2010
    Messages:
    99
    Likes Received:
    0
    Yes, I have summarized that by now....BUT thanks for replying.

    Next question would be, has anyone setup htaccess with elastix 1.6 and a2billing in mind?
    I would be VERY interested in your htaccess config file and how you did it.
     
  4. Centar

    Joined:
    Jan 10, 2010
    Messages:
    99
    Likes Received:
    0
    I believe I have found the solution to my problem.
    I put it here for the benefit of others...

    This is for the default a2billing setup(ver 1.3) in Elastix 1.6

    In file /etc/httpd/conf/httpd.conf
    I put:

    <Directory "/var/www/html">
    AllowOverride None
    Order Deny, Allow
    Deny from all
    # Insert your local lan below ie. 192.168.1
    Allow from xxx.xxx.xxx
    </Directory>

    <Directory "var/www/html/a2customer">
    Order Allow, Deny
    Allow from all
    </Directory>

    <Directory "var/www/html/a2billing/signup">
    Order Allow,Deny
    Allow from all
    </Directory>

    This blocks all outside (wan) access to all of the Apache served directories save for the a2customer and signup directories and allows access to all directories from the local lan.

    If anyone sees any problems with this PLEASE reply...
     

Share This Page