1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Toastman iptable string search problem

Discussion in 'Tomato Firmware' started by n4mwd, May 2, 2013.

  1. n4mwd

    n4mwd Serious Server Member

    I have a problem with certain hackers messing with my router. I want to add a line to IPTABLES that will search all traffic arriving on a certain port for a certain text string in the payload part of the packet - not the header.

    I am told that I need to add the following line to my IPTABLES:

    iptables -A INPUT -p UDP --dport 999 -m string --string 'badstring' -j DROP

    But that produces an error:

    iptables v1.3.8: Couldn't load match `string':File not found

    So I'm thinking that the "String" IPTABLES module is not loaded for some reason.

    So the question is: How do I make this work? Do I need to recompile IPTABLES? Does the Toastman source include the STRING module source?

    Thanks in advance.
     
  2. n4mwd

    n4mwd Serious Server Member

    Ok, it looks like some versions for Toastman have this and others don't. I found a version that had it and it works great.
     
  3. Toastman

    Toastman Super Moderator Staff Member Member

    "string" support was added on March 27 version 7502+

    However, remember these are BETA test versions,mostly ok though.
     
  4. n4mwd

    n4mwd Serious Server Member

    I'm using 0502 I think which is the same as 7502 I think. Its the one I compiled myself. Either way, its got strings. The strings make for an easy way to reject hacker traffic with a certain signature.

    Is there a Tomato specific how-to anywhere that tells how to compile your own 3rd party package? I need asterisk-meetme and Courier Mail, neither of which are in entware. I'm currently building the openwrt stuff because that is where entware seems to come from, but this is one crazy-@ss long compile. Its been going 36 hours now and no sign of coming up for air. Its currently compiling VIM so its getting close I think.

    I have been successfully compiling simple C programs like "HelloWorld.c" on my own, but the bigger programs have a "configure" script that has to be run that sets everything up for the machine that doing the compiling - not the Tomato. So basically, there is a lot that has to be done to get it to work right and a how-to would help a lot probably.
     

Share This Page