Robert Vangel wrote:
Binish A R wrote:
Is there any way, I can use environment variables while logging ?
From what I can think of, no. Environmental variables are parsed then and there. Using $USER in your script would translate into `--log prefix "root NO SSH ALLOWED"' since the user you are running the iptables command as is root.
Yes exactly ... thats what is happening. The shell is expanding $USER as root. I hope there was any way out to log the username :(
Thanks for the replies Robert.