Bash input Question

Discussion in 'Programming/Scripts' started by collimic, May 3, 2011.

  1. collimic

    collimic New Member

    Sorry Very new to bash.

    I am trying to create a bash script to block my internet users.

    It looks like this
    Code:
    #! /bin/bash
    iptables -A FORWARD -s 192.168.1.222 -j DROP
    
    I would like to be able for this script to ask for the IP address and ad it itself.
    where I try block and an ip address and it changes the script to match.

    ./block 192.168.1.223 and it will block that IP
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. erosbk

    erosbk New Member

    Good tutorial xD
     

Share This Page