Changing network adapter priority in wine
Changing network adapter priority in wine
Hi everyone, I am trying to play Star Wars Battlefront II (2005) on LAN via a VPN. Battlefront II does not allow specifying a particular IP address, it scans the network and looks for open games. The problem is it only scans the interface with the highest priority, which means on Windows I had to go to ncpa.cpl, right click on the network adapter, and rearrange the priorities so that the VPN interface was highest. Now that I'm running it in wine, multiplayer is not working for this exact reason. Multiplayer works when playing with people on my LAN network and online, but it does not work over the vpn. How do I rearrange the priorities of the network interfaces so that Battlefront II is forced to use the VPN interface instead of the LAN interface? Even better, is it possible to allow wine access only to a particular interface? Thanks!
-
- Level 1
- Posts: 5
- Joined: Wed Aug 09, 2023 2:44 pm
Re: Changing network adapter priority in wine
Hello,
To rearrange the network interface priorities in Linux and force Battlefront II running in Wine to use the VPN interface, you can use the ifmetric tool to adjust the interface metrics. Follow these steps:
1. Determine the names of your network interfaces:
Open a terminal and run the command:
2. Identify the names of your LAN interface and VPN interface. They are typically named something like eth0, eth1, tun0, or wlan0.
Install the ifmetric tool (if not already installed):
3. Adjust the interface metrics:
Open a terminal and run the following commands:
Replace <VPN_INTERFACE_NAME> with the actual name of your VPN interface and <LAN_INTERFACE_NAME> with the name of your LAN interface. This will set the metric of the VPN interface to 0 and the metric of the LAN interface to 100.
4. Test Battlefront II:
Launch Battlefront II in Wine and try to play multiplayer over the VPN. It should now prioritize the VPN interface since it has a lower metric.
To rearrange the network interface priorities in Linux and force Battlefront II running in Wine to use the VPN interface, you can use the ifmetric tool to adjust the interface metrics. Follow these steps:
1. Determine the names of your network interfaces:
Open a terminal and run the command:
Code: Select all
ifconfig
Install the ifmetric tool (if not already installed):
Code: Select all
sudo apt-get install ifmetric
Open a terminal and run the following commands:
Code: Select all
sudo ifmetric <VPN_INTERFACE_NAME> 0
sudo ifmetric <LAN_INTERFACE_NAME> 100
4. Test Battlefront II:
Launch Battlefront II in Wine and try to play multiplayer over the VPN. It should now prioritize the VPN interface since it has a lower metric.