Query on –m option of iptables command

I have a query on the use of the –m option of iptables command in RHEL 6.0. I have seen commands like:
iptables –A INPUT –m state --state ESTABLISHED,RELATED –j ACCEPT
which makes quite good sense but the below command:
iptables –A PREROUTING -s 10.101.17.34 –d 10.101.15.84 –p tcp –m tcp --dport 443 –j REDIRECT –to-ports 30080
does not seem to be useful as tcp is already given against the –p option then what is the use of specifying –m option again with tcp. I am be wrong on this.
I hope my query is clear.
Please revert with the reply to my query.
Regards

Hi,
When we see the man command for iptables which is the manual reference.
# man 8 iptables
-m, --match match
    Specifies a match to use, that is, an extension module that tests for a specific property. The set of matches make up the condition under which a target is invoked. Matches are evaluated first to last as specified on the command line and work in short-circuit fashion, i.e. if one extension yields false, evaluation will stop.
For more information, look at this URL.
The match can be: account , comment , connbytes , connlimit , ipv4options , osf, recent, set, tos, tcp, udp
For more information, look at this URL.
I hope this can help you
Best Regards

Similar Messages

  • How to query a DHCP option field?

    I am able to successfully define various DHCP Option codes for use with Apple's DHCP server and indeed I am the person who wrote a GUI utility to make it much easier to generate the data values needed to do this. The following is a typical example of what you need to (manually) add to /etc/bootpd.plist
    <key>dhcpoption66</key>
    <data>
    CgBklg==
    </data>
    I am also able to query specific DHCP option codes (as provided by Apple's DHCP server as above) using IPNetMonitorX from Sustainable Softworks. However it should I believe be possible to do the same tests via the command line in Terminal using the ipconfig getoption command, please see the "man ipconfig" page.
    While as an example "ipconfig getoption en0 router" works fine, I cannot seem to get the right syntax for querying a specific DHCP option code, despite the man page suggesting this should be possible. Unfortunately like nearly all man pages, the information is very skimpy and the examples practically non-existant.
    Could anyone reply with the correct syntax to query as an example DHCP option code 66?
    I suppose (gasp!) Apple could have a bug in ipconfig preventing the ability to query option codes. (Shock, horror!)

    MrHoffman wrote:
    When in doubt, use the source.
    The DHCP [client.c source code|http://www.opensource.apple.com/source/bootp/bootp-198.2/ipconfig.tproj/client.c] might be interesting here.
    The core of the option-related code looks to be over in the [dhcp_options.c source code|http://www.opensource.apple.com/source/bootp/bootp-198.2/bootplib/dhcp_options.c ?txt] and what looks to be the option tag table mapping is over in the [gendhcp_parsetable.h source code|http://www.opensource.apple.com/source/bootp/bootp-198.2/bootplib/gendhcp_parsetable.h].
    A quick read of the source files and particularly the routines command_info and Sgetoption and the tag table implies that the +ipconfig getoption en0 66+ command might work. Or maybe +ipconfig getoption en0 tftpservername+ will work.
    When I test this syntax, I get +ipconfiggetoption failed, (os/kern) failure+ and which obviously doesn't bode well for this syntax, but then I likely don't have any of the related stuff enabled on this test network. (And I'm only very quickly reading the C code here...)
    I have not found and viewed the source but I had tried that exact syntax (as per your example) and got the exact same error hence my comment that maybe (gasp!) there is a bug here.
    I have submitted a bugreporter entry and will have to wait and see if Apple reply.
    Thanks for the apparent confirmation.

  • Query or Profile Option to find Current logged in user in oracle apps R12

    Query or Profile Option to find Current logged in user in oracle apps R12.
    I want to get value of current user who is logged in to that particular session, based on the value of user_id or user_name returned i have to do a Forms Personalization.
    Plz help.
    Regards,
    Sadiya P.

    Hi Sadiya,
    do you have the answer for this? please send it to me because i am also have same requirement. so plz post it here....

  • FR 11.1.1.3 "export to query ready mode" option not working

    Hi All,
    We have a scenario where few users are not able to use the "export to query ready mode" option after running an FR report.
    For some reason the save dialog box doesnt open or doesnt pop up when this option is ticked.
    Note that this issue comes only on running FR Essbase reports. (for FR HFM reports it works fine)
    Does any body have any resolution to this.
    Kindly advise.

    Hi,
    Can anybody explain me the option of this *"Export in Query ready mode"*???
    Is there any document through which I can understand???
    Thanks
    Sourabh
    Edited by: CM on May 11, 2011 6:32 AM

  • Shrink option in -toPostScript command line options still does not work

    shrink and expand options in -toPostScript command line options do not work, it was posted that this issue was fixed in V 8.1.2, but apparently, it is still not working, when printing .out files, the body of the output is pushed to the left and up by about half an inch.
    What was it that was supposed to be fixed? Can someone please assist?

    Please forgive my ignorance, but it's called Adobe Reader 8.1.2. How do I tell that it's for Unix?
    We are using Linux, and just to explain a little more like I should have in the first place, I'm trying to run reports from an Oracle environment which is saving the .out file on the Linux box, then this is sent to a Windows printer for printing...

  • Query Time out option in OpenRowSet

    Team,
         My requirement is to loop through around 100 SSAS Instances and run an MDX query and get response from SQL Server.
         To achive this , I used openrowset solutions
        SET @sqlquery =N'SELECT @LastScanperiod = [[Measures]].[Last Scan Date Internal]]]  
    FROM OPENROWSET(''MSOLAP'', ''DATASOURCE=' + @CubeServername +';Initial Catalog=' + @CubeDBName +';Timeout=10''
      ,''SELECT {[Measures].[Last Scan Date Internal]} ON 0 
     FROM [' + @CubeName +']''
      SET @params = N'@LastScanperiod INT output'; 
       EXEC sp_executesql @sqlquery,@params,@LastScanperiod = @LastScanPeriodKey OUTPUT
       But few of the servers might be down or may take longer time to respond.   I would like to Timeout after a specified period of time instead of waiting until server responds.  Even though I specified Timeout option as 10 sec , still
    its not working.  Any idea how to solve this?
    Thanks,
    Prathap

    Reading about the connection-string properties for MSOLAP on
    http://msdn.microsoft.com/en-us/library/dn140245.aspx
    it appears that you should specify "Connect Timeout" rather than "Timeout". Timeout is the command timeout, that is for how long you permit a command to run once you are connected.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Has the options for custom command buttons and scripts been removed from speedgrade?

    I run alot of framecyclerDI machines and am looking to upgrade them but i cant seem to find any method of adding command bars and buttons like you could in the iridas versions of speedgrade i also cant see a way of executing any external scripts which for me is a big issue as i have a hell of alot of pipeline scripts that the artist could execute.... any ideas or have i just missed somthing ?.......(would love it if they added a python sdk)

    Hi Dennis,
    Thanks for replying,
    Its actually more the other way getting speed grade to control outher things.
    i.e
    take the in and out points and send the track to a dcp creator
    rendering and sending anotated frames directly into my databases notes system
    taking the shotname and seeing if theres is a new version avaliable and pull it from the server to the local machine drive/cache
    Theres a load more..but you get the idea .. using the buttons to execute these commands in the interface made these functions editor friendly...
    I can get round some of the issues by reading from the autosave.ircp and setting up a PYQT GUI but that seems like a bit of a hack.
    I understand the reasons to keep the UI uniform (editors dont like it when you move buttons) but Im suprised these options got removed as intergrating software into pre-existing pipelines would seem to be a selling point for any software..
    Are there any plans in the roadmap for speedgrade that would help me in the future?
    S.P.F

  • Query variable : selection option with no interval

    Hello,
    Is it possible to define a query variable as selection option, with no interval (like in abap).
    I am in 3.X version.
    Many Thanks in advance,
    Manuel

    Hi Manuel,
    This should be possible through multiple single value variables, but to ensure that the user has not in input the same charateristic value for exclusion and selection you may choose to write customer exit at the background.
    I think interval and select option would allow 'To values'.
    So I was wrong in what I said before. SORRY
    However multiple single value would not allow exclusion, I think.
    Your scenario would only be possible by excluding multiple single values in variable type select option and process the variable using customer exit, to trmove all to Values.
    But you are right, you cannot have your scenrio handled , I think.
    ( ie multiple exclusion in from values with no To Values )
    One more way is restrict your characteristic by two input ready variables, one select option for exclusion and have a customer exit to delte all inclusion that were input accidently and one multiple value ready for input variable.
    But, all in all, there would be no straight drive through this I think.
    Hope it helps,
    Regards,
    Sunmit.

  • Selection screen for SAP Query: OR between options

    Hi,
    I have a SAP Query and I need a variant where either of two  fields should not be 0. Is there some way to add an OR between two selection options? I can't change the actual query because it's used with many other variants.
    Thanks

    In abap you can do it, but not sure how you do it in query.
    if s_matnr[] is initial or s_werks[] is initial.
    Do something
    endif.

  • How to use the "-R" option in the command zoneadm?

    Please explain in detail, thanks!

    The "-R" option is there to allow to manipulate zones in an alternate Boot Environment (BE). The parameter that you should use is the mount point of the alternate BE.
    Mount the alternate BE in a separate directory with beadm command and then you can use the zoneadm command with this option.

  • Upgrade to Lion: Option-click "hide" command now broken in Adobe programs

    In the Mac world, clicking outside the active window while holding the option button hides the active window. After upgrading to Lion, I am experiencing a bug in all Adobe programs; option-clicking outside the window will hide the program, but will leave a static "ghost" image of the program on the screen. That is, the screen will look the same, but I can actually click my desktop "through" the window. Hope this makes sense. Is anyone else experiencing this problem? The command-H keyboard shortcut is still functional, though.

    I'm staying away from Lion for a while as I've seen way too many little quirks mentioned on the various forums I frequent.
    I'm thinking although Lion is the latest, it's just not the greatest.
    Apple is in this huge limbo right now for professionals. I sure hope it all gets sorted out and communicated to the public realm so we can make educated future decisions.

  • Iptables command "translated" Cisco ASA 5540 Ver 9.0(1)

    I would like to have these commands on our Firewall to avoid at least several students to use this service. Can someone help me to translate this? It's apparently working great if I will use an Linux box or another firewall compatible with iptables.
    Thanks in advance.
    Hermano
    iptables -I INPUT -s hotspotshield.com -j REJECT
    iptables -I INPUT -s hotspotshield.net -j REJECT
    iptables -I INPUT -s anchorfree.com -j REJECT
    iptables -I INPUT -s anchorfree.net -j REJECT
    iptables -I INPUT -s openvpn.net -j REJECT
    iptables -I OUTPUT -d hotspotshield.com -j REJECT
    iptables -I OUTPUT -d hotspotshield.net -j REJECT
    iptables -I OUTPUT -d anchorfree.com -j REJECT
    iptables -I OUTPUT -d anchorfree.net -j REJECT
    iptables -I OUTPUT -d openvpn.net -j REJECT

    Check the following link, it should help you out.
    http://www.packetpros.com/2012/08/url-filter-on-asa.html

  • Should every SQL query have its own event and command?

    Hello,
    I am developing an application using Cairngorm. My app uses SQL databases.
    I'm creating a separate event and command for each SQL query my application requires. I end up with many events  and commands - twenty different event/command pairs and I'm not even done yet.
    I was wondering if this is the right way to go, or if somehow similar SQL queries should be grouped together in the same event/command, and if so, how would I implement that elegantly?
    I've never used Cairngorm before so I want to make sure I do it correctly.
    Thank you for your time and any assistance you can offer.

    From my point of view, writing any SQL query or making queries directly from the presentation layer (eg. flex) to the db server it's almost always incorrect, awfull and maybe even insecure. The client layer should be more independent from the implementation layer as for instance the db server you are using. Instead you should call services on the server side and then they should have a DAO layer o whatever where the queries are done. You could then invoke one of this services and pass parameters that indicates what you want to do. (except you are using remoting where you will be invoking methods directly)
    Consider the case where you have a Java implemented service layer, you could be using hibernate to access the database and not writing a single line of SQL (maybe some HQL) and then you could do all the queries you need and return the beans retrieved from the database to the client layer using AMF3 and it's serialization/deserialization mechanisms. In a future you could modify your app to use JPA and then this layer use hibernate, then you client layer will remain the same the only changes will be done under the DAO layer.
    So again, in my opinion, db server should never be accesed directly from the presentation layer (Flex, Air or whatever) but from the backend services and this sould be completly abstract to the client layer. I have seen some people trying to do SQL queries from Flash but that it's giving a task to the Flash player it has never been intended to do. A miss use of the thin client the Flash Player is and an bad architecture.
    It would be great to hear others opinions.

  • How to query using 3 optional inputs and case insensitive using SQL?

    Hi Folks,
    I am having trouble with the following query:
    select *
    from t1
    where (1=1)
    and lower(fname) like lower ('%mary%')
    and lower(lname) like lower ('%smith%')
    and lower(status) like lower ('%%')
    I need all three statements in the where clause to be completely optional and case insensitve.
    if I just write the following:
    (1=1)
    and lower(fname) like lower ('%mary%')
    and lower(lname) like lower ('%%') <-- Need to ignore this line
    and lower(status) like lower ('%%') <-- need to ignore this line
    nothing is returned. How do I ignore the 2nd and third lines using SQL only. I know about the ask TOM Article using procedures, but I need to do this using SQL only
    thanks in advance
    Edited by: user2184537 on Oct 16, 2009 9:40 AM
    Edited by: user2184537 on Oct 16, 2009 10:10 AM

    Hi,
    Is this query generated dynamically? (That's the only reason I can see for saying "WHERE 1 = 1".)
    If so, test the parameters for NULL, and only add them if a value was given.
    Failing that, you can explicitly test for NULL parameters
    where   (     lower(fname)  = '%' || lower (:p_fname) || '%'
         OR     :p_fname     IS NULL
    and     (     lower(lname)  = '%' || lower (:p_lname) || '%'
         OR     :p_lname     IS NULL
    and     (     lower(status) = '%' || lower (:p_status) || '%'
         OR     :p_status    IS NULL
         )Did you really mean to have all those '%''s? '%' is a wildcard in LIKE operations, but not when using =.
    Perhaps you should be saying:
    where   (     lower(fname)  = lower (:p_fname)
         OR     :p_fname     IS NULL
    and     (     lower(lname)  = lower (:p_lname)
         OR     :p_lname     IS NULL
    and     (     lower(status) = lower (:p_status)
         OR     :p_status    IS NULL
         )You're already handling case-sensitivity, by using LOWER in all the comparisons.
    Unfortunately, you can't just say something like:
    WHERE   LOWER (fname) = LOWER (NVL (:p_fname, fname))because that would discartd rows where fname IS NULL when :p_name is also NULL.
    Edited by: Frank Kulash on Oct 16, 2009 12:54 PM

  • Passing an option to java command (from JDev31).

    Hi,
    I need to pass -Dorg.omg.CORBA.ORBInitialHost=buzz to java command.
    I think it should be added in jdeveloper.ini file but I dont know how.
    Your help would be highly appreciated,
    Reza
    null

    Hi,
    It is very likely you want to pass this command line option for your application.
    Bring up the Project properties dialog., click 'Run/Debug' tab. enter your options in
    the Java VM parameters field.
    Hope this helps,
    Sathish
    null

Maybe you are looking for

  • Image icons in Finder

    When I copy a lot of images into a folder, the icons in Finder aren't always created correctly. Can anyone tell me why or how to update them once they have been created? Here is a sample:

  • Photos not appearing in photostream

    I have updated my iphone 4s to ios 7.0.3. Now when I take photos they are not appearing in my photostream. I always take photos by going into the app, never the lockscreen.

  • ABUMN-error "Posting transaction is not possible (Value date not allowed)"

    Hi, When we are trying to transfer asset within company code thru Tcode ABUMN, we are getting a error as "Posting transaction is not possible (Value date not allowed)" What actually we are doing is we are trying to transfer the previous year asset fo

  • Which RAID controller do I choose?

    Hi forum. I'm waiting for my Asus P9X79-E WS board to arrive this week and I will be using RAID 0 with a separate daily backup drive for it. Before I can afford high end RAID controllers like the Areca etc, I will have to use the onboard controllers.

  • Issue with PartnerLink invocation

    When i'm trying to invoke my partnerlink wsdl i have received the following error message. Can any one tell me how to resolve this issue. <messages><input><LN_SyncAssembliesAssemblySynchronizationAppReqMsg><part xmlns:xsi="http://www.w3.org/2001/XMLS