котопес 0 Posted 2007-02-11 12:19:41 Share Posted 2007-02-11 12:19:41 Bad argument `ACCEPT' Try `iptables -h' or 'iptables --help' for more information. Bad argument `ACCEPT' Try `iptables -h' or 'iptables --help' for more information. Bad argument `ACCEPT' Try `iptables -h' or 'iptables --help' for more information. Bad argument `ACCEPT' Try `iptables -h' or 'iptables --help' for more information. ======OnConnect===== #!/bin/bash # Login LOGIN=$1 #user IP echo $2 IP=$2 #cash CASH=$3 #user ID ID=$4 echo "C `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log iptables -t filter -A INPUT -s $IP -j ACCEPT iptables -t filter -A FORWARD -s $IP -j ACCEPT iptables -t filter -A FORWARD -d $IP -j ACCEPT iptables -t filter -A OUTPUT -d $IP -j ACCEPT когда подставляешь вместо IP=$2 - IP=192.168.4.2 авторизатор коннектится кто сталкивался? Link to post Share on other sites
aliens 0 Posted 2007-02-11 14:43:30 Share Posted 2007-02-11 14:43:30 echo $2 необходим? Link to post Share on other sites
Cell 7 Posted 2007-02-11 14:48:07 Share Posted 2007-02-11 14:48:07 Bad argument `ACCEPT'Try `iptables -h' or 'iptables --help' for more information. Bad argument `ACCEPT' Try `iptables -h' or 'iptables --help' for more information. Bad argument `ACCEPT' Try `iptables -h' or 'iptables --help' for more information. Bad argument `ACCEPT' Try `iptables -h' or 'iptables --help' for more information. ======OnConnect===== #!/bin/bash # Login LOGIN=$1 #user IP echo $2 IP=$2 #cash CASH=$3 #user ID ID=$4 echo "C `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log iptables -t filter -A INPUT -s $IP -j ACCEPT iptables -t filter -A FORWARD -s $IP -j ACCEPT iptables -t filter -A FORWARD -d $IP -j ACCEPT iptables -t filter -A OUTPUT -d $IP -j ACCEPT когда подставляешь вместо IP=$2 - IP=192.168.4.2 авторизатор коннектится кто сталкивался? попробуй вот так... по умолчанию всеравно таблица filter заполняется iptables -A INPUT -s $IP -j ACCEPT iptables -A FORWARD -s $IP -j ACCEPT iptables -A FORWARD -d $IP -j ACCEPT iptables -A OUTPUT -d $IP -j ACCEPT У меня именно так работает Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now