S
S
Svah2018-04-17 17:40:37
CentOS
Svah, 2018-04-17 17:40:37

How to enter all available ip addresses under centos 6 into 3proxy config?

there is a script that once worked out, but I got an incorrect copy, maybe the wrong characters were copied somewhere?
script for auto-configuring / auto-raising 3proxy with auto-registration of all available IP addresses on a server running centos 6, all commands are executed correctly up to a couple of lines, namely up to here:

interface=/sbin/ifconfig grep|eth0 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
echo "socks -p235 -i$interface -e$interface" >>/etc/3proxy.cfg

logically, it should add the following lines to the 3proxy.cfg file
socks -p235 -i123.123.123.123 -e123.123.123.123
socks -p235 -i124.124.124.124 -e124.124.124.124

etc. all the IP addresses that are available on the ifconfig command, but this does not happen, an error is generated ...
tell me what is wrong in this command?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rustler2000, 2018-04-17
@Svah

interface=$(/sbin/ifconfig eth0|grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
echo "socks -p235 -i$interface -e$interface" >>/etc /3proxy.cfg
and this is only for eth0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question