Find the answer to your Linux question:
Results 1 to 2 of 2
HI., when i was try to execute this command in my router device it will show error... First execution :- # iptables -I OUTPUT -p tcp --dport 80 -m string ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    31

    Post error while blocking this websites bittorrent & edonkey using iptables .


    HI.,
    when i was try to execute this command in my router device it will show error...

    First execution :-

    # iptables -I OUTPUT -p tcp --dport 80 -m string --string "bittorrent.com" -j DROP
    iptables v1.4.0: Couldn't find match `string'

    Try `iptables -h' or 'iptables --help' for more information.

    Second Execution :-

    # iptables -I OUTPUT -p tcp --dport 80 -m string --string "edonkey.com" -j DROP
    iptables v1.4.0: Couldn't find match `string'

    Try `iptables -h' or 'iptables --help' for more information.

    so I Need to block this kind of websites ...kindly tell me what i have to rectify & change..
    here i didnt execute this command...


    Regards
    Saravanan G

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,754
    Man iptables

    string

    This modules matches a given string by using some pattern matching strategy. It requires a linux kernel >= 2.6.14.
    --algo bm|kmp
    Select the pattern matching strategy. (bm = Boyer-Moore, kmp = Knuth-Pratt-Morris)
    --from offset
    Set the offset from which it starts looking for any matching. If not passed, default is 0.
    --to offset
    Set the offset from which it starts looking for any matching. If not passed, default is the packet size.
    --string pattern
    Matches the given pattern. --hex-string pattern Matches the given pattern in hex notation.
    A) Kernel >= 2.6.14

    B) Support for "string" matching compiled into the version of iptables you're using.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •