Mario Marietto <marietto2...@gmail.com> writes: > There is still a problem. If I login automatically as user and inside > the script I do this : > > sudo iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE > > it asks me for the password (don't know why it didn't before) but I > can't issue a password,because the script inside the vm should work > automatically and should be hidden between the FreeBSD processes. >
Why does it need to be executed at login? Maybe you could get root's crontab to execute it. A script could detect when a user is logged in.