עזרה בהגדרות חומת אש לשרת
-
(למרות זה...)
צ'אטGPT מציע לי את זה
# Define the URL of the CSV file $csvUrl = "https://www.nirsoft.net/countryip/il.csv" # Download the CSV file content $csvContent = Invoke-WebRequest -Uri $csvUrl -UseBasicParsing | Select-Object -ExpandProperty Content # Convert the CSV content to objects $ipRanges = $csvContent | ConvertFrom-Csv -Delimiter "`t" -Header "StartIP", "EndIP", "Size", "Date", "Company" foreach ($range in $ipRanges) { $startIP = $range.StartIP $endIP = $range.EndIP $company = $range.Company # Create a firewall rule for the IP range New-NetFirewallRule -DisplayName "Allow $company $startIP-$endIP" -Direction Inbound -Action Allow -RemoteAddress "$startIP-$endIP" } Write-Output "Firewall rules have been created successfully."אני לא יושב על ווינדוס כרגע ולא בדקתי שזה עובד, אבל לפום ריהטא זה נראה הגיוני
צריך גם להגדיר שברירת המחדל יהיה לחסום.
משהו כזה:Set-NetFirewallProfile -DefaultInboundAction Block -DefaultOutboundAction Allow -
(למרות זה...)
צ'אטGPT מציע לי את זה
# Define the URL of the CSV file $csvUrl = "https://www.nirsoft.net/countryip/il.csv" # Download the CSV file content $csvContent = Invoke-WebRequest -Uri $csvUrl -UseBasicParsing | Select-Object -ExpandProperty Content # Convert the CSV content to objects $ipRanges = $csvContent | ConvertFrom-Csv -Delimiter "`t" -Header "StartIP", "EndIP", "Size", "Date", "Company" foreach ($range in $ipRanges) { $startIP = $range.StartIP $endIP = $range.EndIP $company = $range.Company # Create a firewall rule for the IP range New-NetFirewallRule -DisplayName "Allow $company $startIP-$endIP" -Direction Inbound -Action Allow -RemoteAddress "$startIP-$endIP" } Write-Output "Firewall rules have been created successfully."אני לא יושב על ווינדוס כרגע ולא בדקתי שזה עובד, אבל לפום ריהטא זה נראה הגיוני
צריך גם להגדיר שברירת המחדל יהיה לחסום.
משהו כזה:Set-NetFirewallProfile -DefaultInboundAction Block -DefaultOutboundAction Allow@yossiz כתב בעזרה בהגדרות חומת אש לשרת:
זה הרשימה המלאה?
נטפרי למשל לא מופיעים שם (1,2)
וכן הכתובות הקבועה/פרטית שלי (מתחיל ב89.208) -
@yossiz כתב בעזרה בהגדרות חומת אש לשרת:
זה הרשימה המלאה?
נטפרי למשל לא מופיעים שם (1,2)
וכן הכתובות הקבועה/פרטית שלי (מתחיל ב89.208) -
כאן לכאורה יש את המלאה
https://www.ip2location.com/free/visitor-blocker
מעניין שאין להם לווינדוס, ללינוקס יש להם קובץ מוכן לפיירוול
אז לכאורה צריך להוריד משם CIDR
שלום! נראה שהשיחה הזו מעניינת אותך, אבל עדיין אין לך חשבון.
נמאס לכם לגלול בין אותם הפוסטים בכל ביקור? כשנרשמים לחשבון, תמיד תחזרו בדיוק למקום שבו הייתם קודם, ותוכלו לבחור לקבל התראות על תגובות חדשות (בין אם במייל, ובין אם בהתראת פוש). תוכלו גם לשמור סימניות ולפרגן ב-upvote לפוסטים כדי להביע הערכה לחברי קהילה אחרים.
בעזרת התרומה שלך, הפוסט הזה יכול להיות אפילו טוב יותר 💗
הרשמה התחברות