mirror of https://github.com/PentHertz/srsLTE.git
Added command commandline argument to the interface masquerading script
This commit is contained in:
parent
3af13f4f2e
commit
6945ac697c
|
@ -23,8 +23,15 @@
|
||||||
#Check for sudo rights
|
#Check for sudo rights
|
||||||
sudo -v || exit
|
sudo -v || exit
|
||||||
|
|
||||||
echo "Masquerading Interface"
|
#Check if outbound interface was specified
|
||||||
|
if [ ! $# -eq 1 ]
|
||||||
|
then
|
||||||
|
echo "Usage :'sudo ./if_masq.sh <Interface Name>' "
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Masquerading Interface "$1
|
||||||
|
|
||||||
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward 1>/dev/null
|
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward 1>/dev/null
|
||||||
sudo iptables -t nat -A POSTROUTING -o wlp58s0 -j MASQUERADE
|
sudo iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue