apply chain to a range of ports not working

Discussion in 'BungeeCord Discussion' started by vemacs, Sep 8, 2013.

  1. vemacs

    Artist

    Here's my iptables list:

    [​IMG]

    Here's what I ran:

    Code (Text):
    sudo iptables -A bungee --src 198.24.184.210 -j ACCEPT
    -- so on --
    sudo iptables -I INPUT -m tcp -p tcp --dport 25500:25700 -j bungee
    sudo /etc/init.d/iptables-persistent save
     
    It looks like it should work, right? But I can still connect to a server on port 25571. Any suggestions? I got the params from this guide.

    Server is Ubuntu Server 12.04. Tried it on a CentOS 6 server (I know), didn't work either.
     
  2. vemacs

    Artist

    Thanks to ammar2: http://pastie.org/pastes/8308453/text?key=0eihzaukurghealybfg

    That worked.

    Code (Text):
    iptables -F
    iptables -A INPUT -s 10.4.56.154/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -s 10.4.56.150/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -s 10.4.16.26/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -s 10.4.0.10/32 -p tcp -m tcp -j ACCEPT
    siptables -A INPUT -s 10.4.15.34/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -s 10.4.37.114/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -s 10.4.46.142/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -s 10.4.4.94/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -s 10.4.13.110/32 -p tcp -m tcp -j ACCEPT
    iptables -A INPUT -p tcp -m tcp --dport 10000:11000 -j DROP
    service iptables save
     
    #2 vemacs, Sep 8, 2013
    Last edited: Sep 22, 2013