iptables on Windows10

General Tech Bugs & Fixes 3 years ago

2.33K 2 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago

I'm looking for a way to get iptables functionality in windows 10. I enabled IP routing and I need to forward tcp data to another host (port 4000) and then forward his response while masquerading IP. In linux I was able to do this using the following:

iptables -A INPUT -p tcp --dport 4000 -m string --hex-string '|FF01|' --algo bm -j DROP
iptables -A INPUT -p tcp --dport 4000 -m string --hex-string '|1400|' --algo bm -j REJECT

Thanks guys!

0 views
0 shares

profilepic.png
manpreet 3 years ago

Windows Firewall has a similar style of rules to block certain IPs from entering on a port.

  1. Open Windows Defender Firewall with Advanced Security. It should appear if you search Windows Firewall in the Start menu
  2. From the left pane, select inbound rules
  3. From the right pane, select New Rule
  4. Rule Type: Choose Custom
  5. Program: Choose All Programs
  6. Protocol and Ports: Protocol Type is TCP, Local Port is Specific Port 4000. Remote port is unset.
  7. Scope: Enter the IPs and Ranges you want to block. Note that LAN IPs go in the upper box. WAN IPs go in the lower box
  8. Action: Block the connection
  9. Profile: Select all options
  10. Name: Set per your preferences. This has no effect on the rule.

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum