You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I typed the following line at the terminal:
sudo orjail -v -s -r 10.200.219.2 10.200.219.1 30
When I check the IPs by typing "ifconfig -a", the IPs shown are not those typed in the command line, are random IPs. I tried to correct this defect by editing the "orjail" file and putting an "if" to test the command line values. The code stretch was as follows:
if [ "${IPHOST}x" = "x" -a "${IPNETNS}x" = "x" ];then
# generate a random available address from specified subnet mask
set +e
USEDADDR=$(ip addr show type veth| grep -Po 'inet \d+.\d+.\K(\d+)')
for available_subnet in $(shuf -i 1-255 -n 254); do
if ! echo "$USEDADDR" | eno grep "^$available_subnet$"; then
break
fi
done
set -e
IPHOST=${IPHOSTMASK//x/$available_subnet}
IPNETNS=${IPNETNSMASK//x/$available_subnet}
fi
Is it right? Can I do this?
The text was updated successfully, but these errors were encountered:
I typed the following line at the terminal:
sudo orjail -v -s -r 10.200.219.2 10.200.219.1 30
When I check the IPs by typing "ifconfig -a", the IPs shown are not those typed in the command line, are random IPs. I tried to correct this defect by editing the "orjail" file and putting an "if" to test the command line values. The code stretch was as follows:
Is it right? Can I do this?
The text was updated successfully, but these errors were encountered: