Block IP addresses using Apache on NW

Hello -
Config:
NW 6.5 SP8
Apache 2.0.63
Could someone tell me how-to block certain IPs with a 403 or some other 400 message? I have read about using .htaccess files and mod_rewrite and a few other things to block access from certain IPs but I'm not familiar enough with Apache to decide how to go about this. Are there lines I can add to the httpd.conf file that will block IPs, or do I need to take a different approach?
Thanks,
B.

On 30/03/2010 15:36, Bob-O-Rama wrote:
> The OR is implied... so you will have a list of
>
> DENY FROM ______
>
> entries. Its identical to using Apache on any platform.
Strictly speaking it's an AND rather than OR - deny from first
host/network AND deny from second host/network etc.
Note that by using 'Order allow,deny' followed by 'Allow from all' then
all hosts/networks will be allowed unless you have specifically denied them.
From http://httpd.apache.org/docs/2.2/mod...uthz_host.html
--begin--
Ordering is one of:
Allow,Deny
First, all Allow directives are evaluated; at least one must match,
or the request is rejected. Next, all Deny directives are evaluated. If
any matches, the request is rejected. Last, any requests which do not
match an Allow or a Deny directive are denied by default.
Deny,Allow
First, all Deny directives are evaluated; if any match, the request
is denied unless it also matches an Allow directive. Any requests which
do not match any Allow or Deny directives are permitted.
---end---
HTH.
Simon
Novell Knowledge Partner (NKP)
Do you work with Novell technologies at a university, college or school?
If so, your campus could benefit from joining the Novell Technology
Transfer Partners (TTP) group. See www.novell.com/ttp for more details.

Similar Messages

  • Block IP Address in J2SE

    Hi, im try to make aplication when it can block ip address to access my computer. any body know how to block ip address using java??

    Java is not suited. It gets data only after it's been processed by the os. You need somethin that works in the os.

  • Sending email to multiple address using Utl_Smtp

    Hi,
    I want to send email to multiple address using the Utl_Smtp feature.
    When I am sending email to one email address in the To:Field it works fine.However, when I send
    to multiple address I am getting the below error.I am using a table(Email_test) to store all email id.
    Error report:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 20
    ORA-06512: at "SYS.UTL_SMTP", line 98
    ORA-06512: at "SYS.UTL_SMTP", line 240
    ORA-06512: at line 48
    29279. 00000 - "SMTP permanent error: %s"
    *Cause:    A SMTP permanent error occurred.
    *Action:   Correct the error and retry the SMTP operation.
    I am trying two options both ways I am getting error
    Option 1:
    Selecting two email id indivually in the select query as below
    select email into v_Recipient1 from Email_test where Key_name='U1';
    select email into v_Recipient2 from Email_test where Key_name='U2';
    v_Recipient := v_Recipient1||';'||v_Recipient2;
    Option 2:
    Is there a way to use option
    select email into v_Recipient1 from Email_test where Key_name='U4';
    ===========================================================
    Create table Script
    ===========================================================
    create table Email_test (Email varchar2(100),Key_name varchar2(10));
    insert into Email_test values ('[email protected]','U1');
    insert into Email_test values ('[email protected]','U2');
    insert into Email_test values ('[email protected]','U3')
    insert into Email_test values ('[email protected];[email protected];[email protected]','U4');
    select * from Email_test
    [email protected]                         U1
    [email protected]                         U2
    [email protected]                         U3
    [email protected];[email protected];[email protected]     U4
    select * from Email_test where Key_name in ('U1','U2','U3')
    [email protected]     U1
    [email protected]     U2
    [email protected]     U3
    select * from Email_test where Key_name='U4'
    [email protected];[email protected];[email protected]
    =======================================================
    PL/SQL Block
    ===========================================================
    declare
    v_From VARCHAR2(80) := '[email protected]';
    v_cc VARCHAR2(80);
    v_Recipient VARCHAR2(80) ;
    v_Recipient1 VARCHAR2(80) ;
    v_Recipient2 VARCHAR2(80) ;
    v_Subject VARCHAR2(80);
    v_Mail_Host VARCHAR2(50);
    v_Mail_Conn utl_smtp.Connection;
    crlf VARCHAR2(2) := chr(13)||chr(10);
    begin
    --Mail Host name
    select VALUE into v_Mail_Host from Server_info where server_name = 'SMTPServer';
    select email into v_Recipient1 from Email_test where Key_name='U1';
    select email into v_Recipient2 from Email_test where Key_name='U2';
    v_Recipient := v_Recipient1||';'||v_Recipient2;
    --for CC
    select email into v_cc from Email_test where Key_name='U3';
    v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
    utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
    utl_smtp.Mail(v_Mail_Conn, v_From);
    utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
    utl_smtp.Rcpt(v_Mail_Conn, v_cc); -- To CC recepient
    utl_smtp.Rcpt(v_Mail_Conn, v_BCC); To BCC recepient
    utl_smtp.Data(v_Mail_Conn,
    'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
    'From: ' || v_From || crlf ||
    'Subject: '|| v_Subject || crlf ||
    'To: ' || v_Recipient || crlf ||
    'Cc: ' || v_cc || crlf ||
    'Content-Type: text/html;' ||crlf ||
    --'Hello this is a test email');
    crlf || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf );
    utl_smtp.Quit(v_mail_conn);
    end;
    Any suggestion how to approach this issue.
    Thank you

    Simple Mail Transfer Protocol RFC 5321 specifications.
          RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF>
       The first or only argument to this command includes a forward-path
       (normally a mailbox and domain, always surrounded by "&gt;" and "&lt;"
       brackets) identifying one recipient.In other words, you can only define a SINGLE mailbox address at a time. Multiple addresses requires multiple repeats of this command verb, once per maibox.
    Do not confuse this and the To: tag line in the Mime header that contains a comma delimited list of recipients. That tag line can contain anything - it is not parsed, not checked, and not verified as matching the actual recipient mailboxes as specified via the RCPT TO verb.

  • Multiple instances of WL on the same box :several Ip addresses using the same port

    Hi all,
    I want to set up several instances of WL on the same server. These
    instances will be clustered.
    I am using Apache for the WebServer.
    Here the configuration I used:
    I first change the weblogic.conf file in Apache to set up the bridge.I
    restart apache using apachectl.
    Then, on the WebLogic site, I created a new ipadress using ifconfig
    hme0:1 ip adress ...
    I created a file hostname.hme0:1 in /etc
    I added this Ip address in /etc/hosts.
    I added this Ip address in the mycluster DNS.
    I wanted to start both WL manually using startWebLogic.sh file to see
    the log file.
    So, I first assign hostname to WL1. Then start WL.
    I opened an other terminal. Assign the hostname to WL2. Then start using
    startWebLogic.sh.
    The first instance started correctly.When the second started, there was
    an error: when listening to the port 7001, this port was already used.
    That was the same with the port 7002.
    Then , my question is How is it possible to configure several instances
    on the same machine using several ip addresses and one port.
    Thank you for your help.
    Erwan

              Please try -Dweblogic.system.bindAddr=<a.b.c.d> in your startWebLogic.sh.
              Brian
              "Merg" <[email protected]> wrote:
              >> Then , my question is How is it possible to configure
              >> several instances on the same machine using several
              >ip
              >> addresses and one port. Thank you for your help. Eourwan
              >
              >On Win2K/WinNT you can assign several IP adresses to you
              >NIC. (Advanced
              >TCP/IP options.) Each server instance has to run on it's
              >own port.
              >
              >Regards,
              >Merg
              >
              >
              

  • Controling IP addressed used to issue HTTP request

    Hi,
    We are looking for a way to control the IP address we use for outgoing HTTP requests so that we can choose between two IP addresses we will have on a linux server. We have a Linux server running Java/Tomcat which is making HTTP GET requests to Web servers. We want to be able to use one IP address when making requests to one Web server and use a different IP address when making requests to another server. The actual Java method we are using to get the page is connection.getInputStream(), and we get a connection with url.openConnection();
    Is it possible to control which of the server's IP addresses is used for each request, and if so, how? Is there some way we can set up the Linux server or Tomcat to make it work?
    BTW, I believe it is possible to have two IP addresses on a linux server, but I haven't looked into what's involved. Feel free to comment on this if relevant.
    Thanks!

    It is definately possible to have mutliple IP Addresses on a Linux machine.
    As far as setting the local IP Address to bind to when opening a connection, you cannot do this with the Standard HttpURLConnection, HttpsURLConnection, or URLConnection. You can do it, however, using apaches HTTPClient API.

  • I have a blank pop-up that shows up when I start firefox. It doesn't blocks me from using my browser. What can I do to remove it?

    I have run a virus scan, and there were no viruses or bugs found. I have uninstalled Foxfire, restarted my computer, and then reinstalled Foxfire again. This window continues to keep coming up and blocks me from using the web browser. What else can I do to get rid of it?

    Type '''about:support''' in the address bar and press '''Enter.'''
    Under the main banner, press the button; '''Copy Text To Clipboard.'''.
    Then in the reply box at the bottom of this page,
    do a right click in the box and select '''Paste.'''
    This will show us your system details.
    '''No Personal Information Is Collected.'''

  • My antivirus(macfee) has blocked me from using firefox browser. how do i unlock it?

    my antivirus(macfee) has blocked me from using firefox browser. how do i unlock it?

    Several tried to but no one seemed to understand the real problem.
    I COULD, because it was mine too. So it follows the only ultimate solution:
    1. Open Firefox
    2. On the address bar, type – about:config in the URL. Press Enter.
    3. You will be warned about Warranty. Click on “I’ll be careful…”
    4. On the Filter dialog box type – search.conduit
    5. It will display all related entries. Right-click on Preferences Name and Reset.
    It worked for me, after trying a dozen of "fake" solutions. ;)

  • WRT54GS blocking IP address

    My router appears to be blocking one website.  I can't ping the website or IP address.  I can ping every IP address around this one IP.  I do not see any reason why it's getting blocked.  I used another laptop with the same issue using a wireless connection and trying to access the website.  If I take the other laptop and plug in my broadband card the website is accessible.  So, I know or believe I know it's the router blocking the connection.  Any help would be greatly appreciated.

    On the linksys setup page click on the Security tab and uncheck Block Anonymous Internet Requests and click on Save Settings...If that doesn't help then,try to open the ports 443-447 on the router...On the setup page..Click on "Applications and Gaming" tab and then click on "Port Triggering" subtab...  On the first line in Application box type in ABC,Under the Triggered Range and Under the Forwarded Range ... in the start box type in 443 and End box type in 447 and check the enable box...

  • My Wrtg54G and blocking web addresses

    HI
    I have tried to use the setup to block certin web pages but does not seem to work I did u[grde firm ware to the latest one foe my unit. But still still not workin to block the address I have entered. Has any go tthis to work or is linksys going to have this fixed in a new release.
    In the setup 192.168.1.1 under security you can block certain web pages.

    Hi hakmacpace,
    I'd try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit. You should look at the [https://support.mozilla.org/en-US/kb/Troubleshooting-extensions-themes Extensions and Themes troubleshooting guide ] and the [[Troubleshooting plugins]] article as well.
    You could also try [https://support.mozilla.org/en-US/kb/Managing-profiles?s=create+a+new+profile&r=2&e=es&as=s#w_creating-a-profile Creating a new profile].
    Hopefully this helps!

  • I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    There probably is, but it requires that you be able to use punctuation and write in sentences so that we can understand exactly what you want.
    You can block others from using your Apple ID by changing your password.  There is no way to erase what was already downloaded on to someone else's device, for obvious reasons,

  • SSO with a website using Apache Httpclient form post

    Hi ,
    I am trying to obtain, SS0 with a website, that accepts the user information via post.
    I tried using app Integrator, but the website sends a cookie in first request, and redirects to another URL. App Integrator is only catching the first response.
    Thus i tried implementing this Form post using Apache HTTPClient class inside the Abstractportacomponent, as shown..
    The login is taking place. But, When i click on any link on the page, It is redirecting to the login page again, I am wondering where should i give the Cookie, so the portal request will include that cookie in its subsequent requests, so that i wont be prompted for login agian..
    thank you,
    chiranjeevi.
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        {try
                      String url = "http://www.xxxxxxxxxxxxx.com/gold_online/validate.asp";
                      //Here, calling the timberline comes into place.
                       HttpClient client = new HttpClient();
                        PostMethod method = new PostMethod (url);
                        method.setFollowRedirects(false);
                        method.addParameter( "code","xxxxxxx");
                        method.addParameter( "upass", "xxxxxx" );
                                  int statusCode = client.executeMethod( method );
                        if( statusCode != -1 ) {
                             // The Status code for this first request is 302..which is a redirect with the redirect path
                             Header locationHeader = method.getResponseHeader("location");
                             Header cookie = method.getResponseHeader("set-cookie");
                             String redirectedURL = locationHeader.getValue();
                             String host = "http://www.xxxxxxxxxxxxxx.com/gold_online/";
                             redirectedURL = host+redirectedURL;
                             GetMethod method2 = new GetMethod (redirectedURL);
                             method2.setFollowRedirects(false);
                             method2.setRequestHeader("cookie",cookie.getValue());
                             method2.addRequestHeader("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, /");
                             int statuscode2 = client.executeMethod( method2);
                             String contents  = method2.getResponseBodyAsString();
                             // Converting the Relative URLs to Absolute URLs
                             contents = replace (contents,"src=\"","src=\""+host);
                             contents = replace(contents,"href=\"","href=\""+ host);
                             Cookie ck = new Cookie("cookie", cookie.getValue()) ;
                             //adding the cookie to the response...
                             response.addCookie(ck);
                             response.write(contents);
                          method.releaseConnection();

    Hi Manish,
    first, welcome on SDN! About your question:
    The URL iView in SP9++ has been reported quite instable from different sides (just do a look on "URL iView" within this forum). The alternative for the aim you have is to use the good "old" application integrator iView, which behaves very stable and will do what you want without hesitating...
    Also see URL iView and HTTP System - SSO to web app
    Hope it helps
    Detlev
    PS: Please consider to reward point for helpful answers on SDN. Thanks in advance!

  • WRT54G2 and WRT54G locks-up (freezes) when blocking web sites using Access Restrictions

    I am convinced that a few Linksys routers such as WRT54G2 and WRT54G have a major issue when blocking web sites using Access Restrictions (Internet Access Policy). After a few hours of internet access by 15 wired users the Linksys locks-up and blocks all internet web access. The only solution is to restart the power on the router.
    We are currently using a Linksys WRT54G2 v1 (firmware 1.0.04). We upgraded the WRT54G2 v1 firmware to the latest 1.0.04 version which did not resolve the issue.  NOTE: We were previosuly using a a Linksys WRT54G v1.1 (firmware 4.21.1) until the power supply blew a week after we started blocking web sites using Access Restrictions (Internet Access Policy).  
    Basically, we have a T1 internet connection and a hub connected to the Linksys router. We are trying to block several web sites such as facebook, myspace, etc. for 15 wired users. We do not use wireless connections.
    This is the 2nd time it happened with 2 different models.
    Please help ASAP.
    Thank you,
    Lance
    (Mod note: Edited post. Some parts off topic.. Thanks!)

    Also,  you have already upgrade/re-flash the firmware of your Linksys Router you need to reset and reconfigure your router from scratch. Press and hold the reset button for 30 seconds...Release the reset button...Unplug the power cable from your router, wait for 30 seconds and re-connect the power cable...Now re-configure your router...

  • When initiating an e mail to someone with several addresses used in the past the one I use most often does not come up in the first position.  How can I get these multiple e mails prioritized?

    When initiating an e mail to someone with several addresses used in the past the one I use most often does not come up in the first position.  How can I get these multiple e mails prioritized?

    We are talking about the Mail app, right? In the Mail menubar, click on Window and then Previous Recipients:
    That eliminates the previous recipients. If you are talking about the suggestions because there are 10 people with the name 'Steve' in your Contacts, then I do not know how to eliminate those unless you change the name slightly or wait until you type the last name or some other differentiator.

  • How can I make my Kerio WebMail memorize email addresses used previously?

    How can I make my Kerio WebMail memorize email addresses used in the past?

    Have you checked with Kerio support for answers? <br />
    http://support.kerio.com/index.php?_m=knowledgebase&_a=view

  • I have an I pad2, an iMac desktop and an I phone 5, how do I get them all to be bale to face time with each other, do I need different email addresses, use the phone number, or the sim number in the iPad ? Ay help gratefully received !!

    I have an I pad2, an iMac desktop(2012) and an I phone 5, how do I get them all to be able to face time with each other, do I need different email addresses, use the phone number, or the sim number in the iPad ? Any help gratefully received !!

    Graham,
    For the iPad, iMac you need to create verifyible e-mail addresses created with one of the providers such as Yahoo, Gmail,etc.  For the iphone you should use it's phone number, but an e-mail could be used for it too.  If you want to associate these e-mail addresses with a single ID, I'm including a link to give you info about how you can do that. Read it carefully, as it can be a bit confusing.
    http://support.apple.com/kb/HE68

Maybe you are looking for

  • Trying to install Windows on a 2008 macbook

    Hi all, a friend of mine purchased a Windows 7 disk a few weeks ago for the purpose of dualbooting it with his apple computer (a late 2008 macbook). However, we've run into constant problems that we have no idea how to fix, and in the process have ca

  • Warning messages back to back

    Hi Experts, I need to raise 2 messages as "Warning" in a window.I am able to raise both messages as "Error" , and when I'm giving the first message as "Error" and second as "Warning",then I can see them on the screen. But if I give first message as "

  • Nokia E66 error in contacs

    Hy guys, i have a problem with contacts in my E66. In contact list there are many blank lines that i haven't created, when i connect my phone with pc suite (last release) i have the message 'error refreshing contacts' and finally if i try to backup m

  • Documents / Cookbook on how to configure Extended Classic Scenario?

    We currently have the Classic scenario and are thinking of changing to exteded classic becuase we want to use the sourcing cockpit in SRM 7.0.  Does anyone have any good documentation on how to configured Extended Classic?

  • Trigger invalidations, how to detect cause?

    Hello, is it possible to somehow detect what causes object(PKG/PRC/FNC/TRG) invalidations? Application users doesn't have righst to compile the object. After invalidation object can be again successfuly recompiled by ALTER XXX COMPILE; command. For e