Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to ban myself if i load webpage more than 1 times at a time?


    Hello,

    im trying to achive that more than 1 simultaneous connections from one /24 subnet is rejected by netfilter

    But i cant manage to get rejected when Loading hosted website simultaneously several times

    # iptables -L INPUT
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp -- anywhere anywhere tcp dpt:http
    ACCEPT tcp -- anywhere anywhere tcp dpt:http state RELATED,ESTABLISHED
    REJECT tcp -- anywhere anywhere tcp dpt:http flags:FIN,SYN,RST,ACK/SYN #conn/24 > 1 reject-with icmp-port-unreachable
    DROP tcp -- anywhere anywhere tcp dpt:http flags:FIN,SYN,RST,ACK/SYN #conn/32 > 150
    (based on commands from Limit max connections per IP address and new connections per second with iptables - Unix & Linux Stack Exchange)

    OpenVZ VPS
    CentOS 6.x
    2.6.32-042stab093.5

    perl /etc/csf/csftest.pl
    Testing ip_tables/iptable_filter...OK
    Testing ipt_LOG...OK
    Testing ipt_multiport/xt_multiport...OK
    Testing ipt_REJECT...OK
    Testing ipt_state/xt_state...OK
    Testing ipt_limit/xt_limit...OK
    Testing ipt_recent...OK
    Testing xt_connlimit...OK
    Testing ipt_owner/xt_owner...OK
    Testing iptable_nat/ipt_REDIRECT...OK
    Testing iptable_nat/ipt_DNAT...OK
    What is wrong please? Thank you
    Please warn/ban user "habit" if he continue posting non helpful, non ontopic posts.

  2. #2
    Linux Newbie
    Join Date
    Apr 2015
    Location
    Yorkshire, England
    Posts
    142
    just timing.

    Try using a semaphore to avoid detecting a connection and creating a connection being simultaneous.

Posting Permissions

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