Find the answer to your Linux question:
Results 1 to 2 of 2
I have the following in my iptables script: /sbin/iptables -A INPUT -p udp -m udp -s 209.216.2.211 --dport 10000:20000 -j ACCEPT when I run it I get: iptables v1.4.7: host/network ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    2

    iptables -- ip address range switch not working.


    I have the following in my iptables script:

    /sbin/iptables -A INPUT -p udp -m udp -s 209.216.2.211 --dport 10000:20000 -j ACCEPT

    when I run it I get:

    iptables v1.4.7: host/network `209.216.2.202-209.216.2.205' not found
    Try `iptables -h' or 'iptables --help' for more information.

    replacing "-s" with "--src-range" gives the following error:
    iptables v1.4.7: unknown option `--src-range'

    Any help appreciated.

    Thanks

  2. #2
    Just Joined!
    Join Date
    Jan 2013
    Posts
    2
    SOLVED:

    The problem was with my understanding of what the -m switch was.

    the following worked:

    /sbin/iptables -A INPUT -p udp -m iprange --src-range 209.216.2.202-209.216.2.205 --dport 5061 -j ACCEPT

    Hope that helps someone else.

Posting Permissions

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