+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Banned
    Join Date
    Feb 2009
    Location
    KFNL FS2004
    Posts
    11,886
    Blog Entries
    1

    DD-WRT iptables?

     
    Are these IPtables right for using in the CMD shell of DD-WRT's firewall?





    iptables -t mangle -I PREROUTING -i `nvram get wan_iface` -j TTL --ttl-set 10
    iptables -t mangle -I POSTROUTING -o `nvram get wan_iface` -j TTL --ttl-inc 1
    iptables -I OUTPUT -d 239.255.255.250 -j DROP
    #Syn-flood protection
    iptables -N syn_flood
    iptables -A syn-flood -p tcp --syn -m limit --limit 1/s --limit-burst 4 -j ACEPT
    iptables -A syn_flood -j REJECT
    # Furtive port scanner:
    iptables -N port_scan
    iptables -A port_scan -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
    iptables -A port_scan -j REJECT
    iptables -t nat -A PREROUTING -p tcp --tcp-flags ALL FIN,URG,PSH -j REJECT
    iptables -t nat -A PREROUTING-p tcp --tcp-flags ALL ALL -j REJECT
    iptables -t nat -A PREROUTING -p tcp --tcp-flags ALL NONE -j REJECT
    iptables -t nat -A PREROUTING -p tcp --tcp-flags SYN,RST SYN,RST -j REJECT
    #XMAS
    iptables -t nat -A PREROUTING -p tcp --tcp-flags SYN,FIN SYN,FIN -j REJECT
    iptables -t nat -A PREROUTING -p tcp --tcp-flags FIN,ACK FIN -j REJECT
    # FIN packet scans
    iptables -t nat -A PREROUTING -p tcp--tcp-flags ALL SYN,RST,ACK,FIN,URG -j REJECT
    #SSH Protection
    iptables -N rate_limit
    iptables -F rate_limit
    iptables -A rate_limit -p tcp --dport 22 -m limit --limit 3/min --limit-burst 3 -j ACCEPT
    iptables -A rate_limit -p udp --dport 22 -m limit --limit 3/min --limit-burst 3 -j ACCEPT
    iptables -A rate_limit -p ICMP --icmp-type echo-request -m limit --limit 3/sec -j ACCEPT
    iptables -A rate_limit -p ! ICMP -j LOG --log-prefix " Connection dropped!! "
    iptables -A rate_limit -p tcp -j REJECT --reject-with tcp-reset
    iptables -A rate_limit -p udp -j REJECT --reject-with icmp-port-unreachable
    iptables -A rate_limit -j REJECT


    I changed my SSH port to 22. That's not the real port.

  2. #2
    Goverment property now GroundZero3's Avatar
    Join Date
    Oct 2001
    Location
    NOVA
    Posts
    33,805
    Blog Entries
    46
    Quote Originally Posted by Taxmancometh View Post

    I changed my SSH port to 22. That's not the real port.

    Ssh default port is 22, so im a little confused by your statement.

  3. #3
    Banned
    Join Date
    Feb 2009
    Location
    KFNL FS2004
    Posts
    11,886
    Blog Entries
    1
    No, I mean my actual SSH port is something other than 22. I just meant that I changed it here for showing so that no one would know what my real SSH port is. So are those IPtables correct for DD-WRT's firewall?

  4. #4
    Goverment property now GroundZero3's Avatar
    Join Date
    Oct 2001
    Location
    NOVA
    Posts
    33,805
    Blog Entries
    46
    Never really used ip tables but check out this page

    Iptables command - DD-WRT Wiki

  5. #5
    Banned
    Join Date
    Feb 2009
    Location
    KFNL FS2004
    Posts
    11,886
    Blog Entries
    1
    After carefully reading those I found a few errors with my SSH protection and the PREROUTING.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What will be happening with TechIMO WRT vBulletin
    By EXreaction in forum Suggestion Box
    Replies: 0
    Last Post: October 30th, 2009, 10:46 PM
  2. DD-WRT Firmware help
    By MervTeck in forum Networking and Internet
    Replies: 5
    Last Post: February 21st, 2008, 06:33 AM
  3. DD-WRT: the benefits?
    By gunstar in forum Networking and Internet
    Replies: 7
    Last Post: April 26th, 2007, 09:35 PM
  4. ATTN DD-WRT users!
    By GroundZero3 in forum Networking and Internet
    Replies: 4
    Last Post: September 21st, 2006, 03:57 PM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Recommended Sites: ResellerRatings Store Reviews