Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to prevent specific wine applications or any wine application from accessing the internet? When using certain apps under Windows, they were trying to access the internet from time to time without any obvious reason. I was able to prevent that behaviour with a personal firewall back then. Unfortunately I did not find an application level firewall in Ubuntu up to now. This is especially annoying when I am abroad using data-roaming with my 3G modem. Is there a way to prevent my wine-apps sending or receiving data without my knowledge. Thanks in advance! YSN

share|improve this question
    
You can try my noinet preload. askubuntu.com/questions/249826/… –  escor Dec 19 '13 at 13:35

3 Answers 3

up vote 13 down vote accepted

There's a nice tutorial on blocking any given program from accessing the Internet on the Ubuntu forums.

It basically involves creating a new group, denying it Internet access, and then running any program you want to restrict as that group ID. So in your case, you would just always run wine using the method described in the tutorial.

share|improve this answer
    
Thank you, that's it! But I don't understand, why someone has voted you down. Your answer is exactly what I had hoped for. –  YSN Dec 30 '10 at 22:03

make a group and become a member of it

groupadd wino

adduser yourusername wino

now enter an iptables rule to block that group from using the internet you can type this on the terminal and hit enter

iptables -A OUTPUT -m owner --gid-owner wino -j DROP

to make this rule run after each reboot you can put it in /etc/rc.local (make sure the last line in that text file says exit 0)

usage example:

sg wino "wine executablename.exe"

yes you need the " " and also type wine before the programs name.

share|improve this answer
1  
I've edited your usermod command to add -a. Without -a, you will end up removing the user from all other supplementary groups (like admin, cdrom, etc.)! It is also more convenient to use addgroup/adduser. –  gertvdijk Jul 14 '13 at 17:50
    
was just about to fix the -a myself. yes do not start wine as root !. only need root to make the iptables rule. the usage example was for normal user after doing those steps. –  mark Jul 14 '13 at 17:52
    
ah sorry, my mistake. removed comment. –  gertvdijk Jul 14 '13 at 17:53
    
@gertvdijk I edited the commands once more, adduser <username> <groupname> is the sensible thing here. –  guntbert Jul 14 '13 at 17:58
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"MigrateProxy"=dword:00000001
"ProxyEnable"=dword:00000001
"ProxyHttp.1.1"=dword:00000000
"ProxyOverride"="<local>"
"ProxyServer"="http://NonExistantProxyAddress:80"
"User Agent"="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1"

to add to your wine (or playonlinux virtual drives) registry :

much simpler solution indeed than using groups (& does not prevent pol to connect, just the apps)

credits to http://ootput.wordpress.com/2011/06/06/block-wine-applications-from-the-internet/comment-page-1/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.