72

Run the following. It'll insert the rule at the top of your iptables and will allow all traffic unless subsequently handled by another rule. iptables -I INPUT -j ACCEPT You can also flush your entire iptables setup with the following: iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P ...


46

(Note: this method has been working at least on Windows 7, 10 Pro, Server 2012 R2) Following steps will lead you to the rule blocking your connection: Open a Windows console (with Administration rights) to enter commands Enable the audit for Windows Filtering Platform (WFP): run command: auditpol /set /subcategory:"Filtering Platform Packet Drop" /...


33

Make a bash script which adds restrictive iptables rule. Put this script in monthly cron. Inside the bash script make a condition - if file ~/do_not_block_friends exists and its modification time is within of month period (stat -c %y filename) - do not run the script. Once they pay you do touch ~/do_not_block_friends. Script will run and see that ...


26

Yes, and they don't need any magic here, just trivial matching on the TCP packet contents. Even though SSH and TLS (SSL) encrypt their payloads, the protocol headers themselves are still distinguishable and very different from each other. For example, a SSHv2 connection always starts with the client sending SSH-2.0-(client name and version). Similarly, even ...


26

Open Windows Firewall with Advanced Security by running wf.msc. On the left, select Inbound Rules, then under the Action menu, choose New Rule. On the Rule Type page, choose Custom. On Program, choose "All programs." On Protocol and Ports, leave the default of Any. On Scope, select "These IP addresses" in the remote addresses section and add the problematic ...


25

tl;dr Run this command to test a specific port (fast). time nmap -p 22 portquiz.net Run this command to test popular ports (slow). time nmap portquiz.net Run this command to test all ports (extremely slow). time nmap -p- portquiz.net | grep -i open Source: https://tech.michaelaltfield.net/2018/07/03/detect-outgoing-port-blocking-with-nmap-and-portquiz-net/...


20

to accept all incoming traffic you can use following command , -P is to set default policy as accept iptables -P INPUT ACCEPT if you do not require your previous rules just flush/remove them and then use above command. to flush all rules use iptables -F


20

I ran into this issue recently when I started doing Linux development on a Windows laptop where the source code was on the host and it was shared over CIFS* to compile on a CentOS VM. Open Windows Firewall and click on Advanced Settings: In the overview panel, click on Windows Firewall Properties Click on Public Profile Tab, Protected network connections, ...


19

You do not need any 3rd party firewall software. By default windows firewall functions as follows: Inbound - Block all unless in the list (Whitelist) Outbound - Allow all unless in the list (Blacklist) You want to Block all Inbound and all Outbound connections by default. You can do this using Windows built-in Firewall. The way to do this (though ...


18

This website comes in handy for that: http://portquiz.net:1234/ This example tests whether you are able to visit outbound port 1234. You simply change the port number to whatever you like. Also, the site gives some examples that could be used in a command line script: $ wget -qO- portquiz.net:1234 Port 1234 test successful! Your IP: 198.252.206.16


18

You can refer to the guide here. The command to open port 80 is: netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80 You need to specify: name for the rule direction whether to allow the connection protocol used port number You can use this command from the Powershell level. If you absolutely must use ...


17

Go to the following key from Windows Registry and export it to a *.reg file: HKLM\System\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules Edit the file in any text editor and remove the entries you don't want. Or you can go to WFwAS, delete any other rules and keep only the ones you want. Then do the step described above. You ...


17

Since ufw is available in the EPEL repository, it can be directly installed as a package: yum install -y epel-release yum install -y ufw


17

I've seen a variety of vendors doing content filtering based on country of origin. China and Russia are usually the ones with filtering turned on by default, or at least have some kind of alerting set up. This is because those are often sources of malware attacks. I don't buy line that your IT department has no control over it. Any vendor worth its salt ...


14

If you’re working remotely via SSH, you might want to add this (-I inserts it before all other rules in INPUT): iptables -I INPUT -p tcp --dport 22 -j ACCEPT If your SSH service is listening on another port, you’ll have to use that port instead of 22. Otherwise, you might accidentally lose access.


14

It might be more than you're looking for, but have you considered looking into setting up wireless credentials using 802.1x authentication against RADIUS as a backend? RADIUS can be set up to check whatever validator you desire (something you'll probably have to script and store in a database or something) to see if your roomies have paid their rent. When ...


14

You will need to create a Windows Firewall rule. Go to Control Panel -> All Control Panel Items -> Windows Firewall. Click Advanced settings on the right-hand side, click Outbound rules on the left-hand side, then click New Rule on the right. On the next window, make sure you have Program selected and click Next. Select the button for This program path: and ...


13

mateusz@debian:~$ sudo ufw disable Firewall stopped and disabled on system startup mateusz@debian:~$ sudo ufw status verbose Status: inactive mateusz@debian:~$ sudo ufw enable ERROR: problem running ufw-init Even if error occurs, you can check that ufw is running. mateusz@debian:~$ sudo ufw status verbose Status: active Logging: on (low) Default: deny (...


13

Per the manual, it's an unusual but harmless explicit invocation of the tcp iptables module; this module is implicitly invoked when -p tcp (TCP protocol) is specified, and only works when -p tcp is specified anyway, but apparently whoever wrote system-config-firewall's rule generator believed in the belt-and-suspenders theory of reliability.


13

There are several ranges of 'private' ip addresses, as defined in RFC1918. These are: 10.0.0.0 - 10.255.255.255 (10/8 prefix) 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) 192.168.0.0 - 192.168.255.255 (192.168/16 prefix) That an IP address starts with 192 doesn't necessarily mean it's a private IP address. For example the ISP ...


13

This might be caused by a missing or wrong digital signature. Like Apple explains: If you run an unsigned app that is not listed in the firewall list, a dialog appears with options to Allow or Deny connections for the app. If you choose Allow, OS X signs the application and automatically adds it to the firewall list. [...] Some apps check their own ...


13

In an elevated shell window, do Set all profiles to block inbound/outbound traffic: netsh advfirewall set allprofiles firewallpolicy blockinbound,blockoutbound Remove all rules: netsh advfirewall firewall delete rule all Allow basic outbound rules for ports 80,443,53,67,68 netsh advfirewall firewall add rule name="Core Networking (HTTP-Out)" dir=out ...


13

I had the same issue on Windows 10, Firewall + ICS service constantly taking up 10% of CPU time. I don't have Windows Defender enabled so couldn't follow the top answer's instructions. Instead: Click Start and type wf.msc Click Restore Default Policy I'm sure it has the same effect as the other answer


13

Check your pfSense version. I had to update from pfSense 2.4.5_1 to pfSense 2.5.0. That solved the problem for me.


13

I had to go to System / Update / Update Settings and set to previous stable version 2.4.5 deprecated bc I am still on 2.4.5-RELEASE-p1. After doing that, package manger didn't show any updates for a few min and then eventually it started showing updates that were right for my branch. Then I was able to upgrade pfBlockerNG-devel to 3.0.0_10 whereas previously ...


12

This will take a lot of time but will get you the list of all blocked ports: #!/bin/bash COUNTER=1 while [ $COUNTER -lt 65535 ]; do echo $COUNTER curl portquiz.net:$COUNTER --connect-timeout 1 let COUNTER=COUNTER+1 done


12

I dont' know why the above solutions are so complicated, e.g. using route add -p commands or even adding to the OpenVPN server.conf file route 0.0.0.0 vpn_subnet_mask default_gateway The error could simply be solved by going to: Control Panel\Network and Internet\Network Connections (1)Right-click OpenVPN tun/tap interface and select Status > select ...


12

It's whichever network type you are currently connected to. The goal is to let the user allow without having to manually pick the type, while minimising the exceptions (which is why it doesn't allow both automatically). You are probably connected to a network designated as public at the moment. You can change that in the networking control panel. ...


12

You only need allow incoming traffic NTP's ports if you are acting as a server, allowing clients to sync to you. Otherwise, the existance of an NTP state will automatically determine whether the incoming NTP packet is blocked or allowed by an existing firewall state that we initiated. iptables -A OUTPUT -p udp --sport 123 --dport 123 -j ACCEPT iptables -...


12

You can use https://www.enjen.net/asn-blocklist/ An example i.e. colocrossing: https://www.enjen.net/asn-blocklist/index.php?asn=AS36352&type=htaccess If you need to download it to a server and don't want html then add &api=1 to the end of the link.


Only top voted, non community-wiki answers of a minimum length are eligible