DARK SOULS™ III

DARK SOULS™ III

27 ratings
Block Specific Country IP Addresses for Better PvP Experience
By matarabun
Block Specific Country IP Addresses for Better PvP Experience

Warning: Do With Your Own Risk this is may not the easiest method and i hope can help someone who always complain about the lag from other country far from their region

First of all I am often get matched with players that far away from my region and the problem is the lag, more often come from certain countries, In my case are players from china. The steam profile block will have no effect. Therefore I think to block all the ip or network address from china only so I will not get matched again with chinesse players again when i invade or get invaded.
So I was thinking to block all ip in/out from china in my windows 10 firewall, not just one or two ip so i won’t create firewall rules manually one by one, i don’t know what kind of software to use, until I found this article. Sorry for my english BTW

https://cyber-defense.sans.org/blog/2011/10/25/windows-firewall-script-block-addresses-network-ranges

So what is needed to block the country ip?
  1. Powershell.
    The script requires PowerShell which is already in windows 8 and 10. For windows 7 can be downloaded here https://msdn.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell
  2. Download the following file http://www.sans.org/windows-security/files/scripts.zip as informed on the website that contains the script file to block ip
  3. List of ip countries that we will block, you can take from this website https://www.countryipblocks.net/country_selection.php then select the country you want to block and choose format CIDR / IP Range then click Create ACL and on the right side will appear all the ip range from that country
  4. Wireshark https://www.wireshark.org/ to see players ip (optional)

Let's Begin
First of all you should be a member of the local group administrator or you are the owner of the PC. If you are not then stop here.
   
Award
Favorite
Favorited
Unfavorite
Open the zip file
Open the script.zip file you have downloaded in number 2 , extract this folder Day4-IPSec\Firewall to Desktop or anywhere in this example i choose C:\Users\UserPC\Desktop\Firewall . You only need 2 files Import-Firewall-Blocklist.ps1 and Country-BlockList.txt
Edit Country-BlockList.txt
open and edit the Country-BlockList.txt file delete the contents and replace with ip country list you get from number 3 and save. You can also create a new file with any name such as ipblock.txt
Open PowerShell
Open PowerShell right click and select run as administrator
Type the following command
Get-ExecutionPolicy
If Restricted it must be changed first so that the script can be executed, type
Set-ExecutionPolicy -ExecutionPolicy Bypass
Which will bypass the script
Now go to the extracted folder (or path to the folder where you have extracted the script.zip file) and press enter on your powershell
cd C:\Users\UserPC\Desktop\Firewall
Adjust the name for UserPC
Run the script
To run the script type this command
.\Import-Firewall-Blocklist.ps1 -inputfile Country-BlockList.txt
The script will create firewall rules on your PC automatically.




If there are any new ip added in Country-BlockList.txt the script will remove the existing rules and replace them with new rules if you execute the script again.

Next you need to restore your powershell execution policy settings by typing

Set-ExecutionPolicy Restricted


Restart your connection and PC for stability. Done, now go invade and pillage
Note
  • Country ip blocklist may not 100% contains all the ip used in that country
  • You may still get matched with players from the country that you've blocked, BUT i can't confirm this because there's no ip from the players showed on wireshark or other software only ip from steam region (valve singapore) that keeps running when i invaded this guy, so i know only from his profile, but there's no lag at all even no lag parry. So i think they use steam server as a matchmaking backup or they actually players from singapore but none of these players using singapore flag just china flag or just with chinese name (some singapore people using chinese letter for his/her profile name)?? I don't know
  • There's possibility that the players steam profile (of the country that you block) still showing up in your recent game players but he/she can't join your game session and you can't join his/her game session too if you invading him
  • Steam profile page not 100% accurate, they could be from China but don't live there, try Wireshark instead to check their location
  • It may blocked website from that country too if the site ip match your blocklist
  • You may need to try summon players into your world or invaders to ensure firewall rules does not interfere with your connection
  • Open wireshark to see players/hacker/cheater ip




    when you get matched with a player whose ip is not listed in the block list you can add the CIDR or IP range manually in Country-BlockList.txt. For that you can paste the ip detected at wireshark to this site http://whatismyipaddress.com/ip/ to see the players country (you can see that from wireshark too if you install geoip module)


    if the ip match the country you want to block then go to this page https://www.countryipblocks.net and put the ip In the left menu form and click locate ip


    then the CIDR or the network range of the ip can be added to Country-BlockList.txt (if it's an hacker/cheater maybe you need to add his ip only not the whole network range, if he using static ip that's good but if he using VPN or dynamic ip maybe you safe for this session only :P ) and you can execute the Import-Firewall-Blocklist.ps1 script again as mentioned above
  • Do not modify and edit firewall rules created by the script. To delete rules use this command

    .\Import-Firewall-Blocklist.ps1 -rulename Country-BlockList -deleteonly

    If your ip block file has another name such as ipblock.txt then you write

    .\Import-Firewall-Blocklist.ps1 -rulename ipblock -deleteonly
13 Comments
Foxhound Sep 24, 2022 @ 12:23pm 
file website is dead use this one instead https://blueteampowershell.com/ files on same location SEC505-Scripts\Day4\Firewall
osbornia Jun 27, 2021 @ 12:48pm 
Thank god! it's only the chinese players who consistently Ganksquad or hack. :praisesun:
♚♏ønsteṟ-♏asteṟ♚® Apr 27, 2021 @ 6:41pm 
Chinese Brazilian all over the shop...
The Glow Jul 13, 2020 @ 2:05am 
Thanx. I've been getting a bunch of horrid Street Fighter matches with lobbies and even if you block someone via steam they just keep rejoining. Even if just spectating they will lag it out, and they can join after you start a match, and you cant kick mid match. Bad implementation. Looking to capture some IP's and start blocking.
Sasha Mason Jun 25, 2017 @ 11:25am 
@Masada ◐
Because everyone is an american right?
MASADA Jun 25, 2017 @ 3:12am 
TIP: block every country except america
MEITOU Jun 11, 2017 @ 5:38pm 
gives me conniptions
Praise The Meme! Jun 10, 2017 @ 5:39pm 
"Magnificient! I can hardly wait to get started." ~Andre The Blacksmith
"We're not fit to lick their boots." ~Hawkwood The Deserter
"Yo, is- is anybody even paying attention to me?! Agh!" ~Scout
I give this guide an Andre/10. Which is to say, M A G N I F I C I E N T
m3l10r4 Jun 8, 2017 @ 6:23pm 
@Peaches true!

"Cross Region Play: Matchmaking OFF" actually divides players into two regions: Japan & "anyone else". I'm not so sure if it's not working as it's supposed to, though. Maybe it does work as intended and that actually is how fromsoft wanted it to work: giving Japanese a dedicated server - who knows /shrug
https://www.youtube.com/watch?v=Vt_ITu6svIY
Peaches Jun 8, 2017 @ 11:48am 
+๖Sérgý
Except "Cross Region Play: Matchmaking OFF" doesn't work like it's supposed to. If you did some trial and error, you'd realize that. I live in Minnesota and I still get matched with people in China, Japan, South Korea, Italy, UK, France, Germany, etc. even though my Cross Region Play is set to Off.