Kill network connection for Wine

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
francus
Level 1
Level 1
Posts: 9
Joined: Fri Mar 02, 2018 12:35 am

Kill network connection for Wine

Post by francus »

I do not want a Wine appl to connect to internet. Which is the simpler way to permanently kill network connection with Wine? This may be for that application alone or as well for all applications running under Wine. I am just looking for an easy way
Best
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Kill network connection for Wine

Post by dimesio »

Disable wininet in winecfg. It can be done per application or globally.
francus
Level 1
Level 1
Posts: 9
Joined: Fri Mar 02, 2018 12:35 am

Re: Kill network connection for Wine

Post by francus »

Many thanks vore the extremely fast reply, sounds very simple.

In winecfg GUI I do not see any reference to wininet or to a way to disable it.

Is that something to be done with CLI?

May you point me to some tutorial to be able use winecfg this way?
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Kill network connection for Wine

Post by dimesio »

Disable it on the Libraries tab. Add it from the dropdown list, then select it, click "Edit" and set it to "Disable."
francus
Level 1
Level 1
Posts: 9
Joined: Fri Mar 02, 2018 12:35 am

Re: Kill network connection for Wine

Post by francus »

ok, with your instructions it was very easy to do that. Many thanks
francus
Level 1
Level 1
Posts: 9
Joined: Fri Mar 02, 2018 12:35 am

Re: Kill network connection for Wine

Post by francus »

The application, needs wineinet dll so it does not start if it is disabled. Another way to kill the network?
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Kill network connection for Wine

Post by dimesio »

Not in Wine. You can use AppArmor or SELinux to prevent Wine apps from accessing the internet. You'll have to ask on your distro forum how to do that; it's not a Wine question.
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Kill network connection for Wine

Post by DarkShadow44 »

I personally used

Code: Select all

sudo unshare -n runuser fabian -c "wine ping google.de"
in the past.
Locked