5 votes

Enable access to host service with ubuntu firewall from docker container

Figured it out! Though I'm not sure if this is a generic solution. It turns out that because I started my containers with docker-compose the default docker0 interface with IP 172.17.0.1 wasn't how my ...
4 votes

How to SSH between two servers behind firewalls (without a 3rd party server)

In order to allow an SSH connection from RPC-2 to LPC-1 you need to set up port forwarding on LR from an arbitrary port on the outside to the SSH port of LPC-1. You can then connect with SSH from RPC-...
4 votes
Accepted

How to create an outbound rule for a program via the command line?

With Powershell, try the following: New-NetFirewallRule -Direction Outbound -Program “C:\some\program.exe” -Action Block -Profile All -DisplayName “Block My Program.exe” -Description “Block My Program....
4 votes

Cannot ping a Windows 11 machine

In addition to Morphit's answer there is an additional option (if you want to use file and printer sharing on your network): Check your connection classification (private, public, domain). Go to ...
  • 8,412
4 votes
Accepted

What is the purpose of the windows firewall prompt?

The default configuration of Windows Firewall is to confirm inbound connections only. You get the alert whenever a program tries to create a "listening" socket – most commonly done to accept ...
  • 393k
3 votes
Accepted

Bridge-Mode to prevent double NAT/Firewall advantages?

The advantage is that everything is passed through to the pfSense, thus you do not have to worry about port forwarding not working, because you forgot to open it on another device. There is a ...
  • 57.3k
3 votes
Accepted

How do you properly allow two devices on separate subnets to communicate (PFSense)?

As mentioned in my comment, you will need to disable outbound NAT, otherwise the replies from backup drives won't be recognized as replies by MediaServer as their source IP address will become 192.168....
  • 7,854
3 votes
Accepted

Does DNS over HTTPS work in China?

Nope. They block anything they can't easily monitor. This situation changed with the recent introduction of DoH and ESNI – technologies that made DNS lookups fully encrypted and therefore censor ...
  • 3,968
3 votes
Accepted

How to have Windows firewall send RST packet for blocked port

You are trying to Disable stealth mode in Windows, described as: Windows Server or Windows client computers do not send Transmission Control Protocol (TCP) reset (RST) messages or Internet Control ...
  • 423k
2 votes

Windows 10 Firewall warns about being disabled on every login

the notification appears at a seemingly random time within the first 15 minutes of logging in Yes – this adds to the frustration as it makes it harder to reproduce (and understand the cause of) the ...
  • 656
2 votes

How do you properly allow two devices on separate subnets to communicate (PFSense)?

Your media-server will dumbly forward any traffic outside 192.168.0.0/24 to its default gateway (which is 192.168.0.1) and trust that gateway to forward it any further. Do you have a static route ...
  • 28.7k
2 votes
Accepted

Add a IP to another rule matching hex in iptables linux

OP wishes to implement a very crude (because there's a single knock) port knocker. My advice would be to use a tool like fwknop for Single Packet Authentication instead: doesn't send the secret in the ...
  • 4,603
2 votes

Port forwarding and IPv6

There are four parts to making your network service accessible from the Internet: Make sure the service is accessible over the network. This involves: Making sure it isn't bound to the loopback ...
2 votes
Accepted

SMB2 port range? Port 64663?

Each TCP connection involves two ports – a specific port on the server side, a random (ephemeral) port on the client side. You never write firewall rules to match the latter, only the former. On the ...
  • 393k
2 votes

Could in-place upgrade of Server 2012 to 2019 affect firewall rules or IIS sites?

Everything is possible when upgrading, and more so when you're jumping an intermediate Windows Server version. I suggest to convert the server to a virtual machine (P2V) and test it first. Especially ...
  • 423k
1 vote

Bridge-Mode to prevent double NAT/Firewall advantages?

So there would only be one router (the PfSense box) that performs NAT and acts as firewall. I'm wondering what would be the advantages of this change and is it worth the effort? Would I gain ...
  • 39.8k
1 vote
Accepted

Nftables firewall rule hex value 0x1fff changed to decimal 8191

The manpage defines: INTEGER TYPE The integer type is used for numeric values. It may be specified as a decimal, hexadecimal or octal number. The integer type does not have a fixed size, its size is ...
  • 423k
1 vote

iptables firewall whitelisting limit

Use ipset It will be far easier to manage and have better performance. I have block list of over 1 million and it has a negligible impact. Below comments and counters are optional, but nice to have. ...
  • 12.8k
1 vote

Relay TCP upload traffic and make download traffic go directly to the client

Solved by replacing iptables with nftables Note: It cannot be implemented in the real-world network due to the source address verification. Purpose: Client sends request traffic to RelayServer:10080 ...
  • 13
1 vote
Accepted

iptables SNAT for UDP rule is only applied to some traffic

Linux iptables NAT is applied to conntrack states rather than individual packets. If conntrack is already tracking a flow (e.g. after it has received some inbound UDP packets), further packets ...
  • 393k
1 vote
Accepted

How do you configure firewall to map ports outside to a device inside lan?

Mapping addresses & ports is called "NAT", and mapping destination addresses & ports is called "DNAT" (destination NAT) which is also known as "port forwarding". ...
  • 393k
1 vote
Accepted

Allowing ICMP (ping) incoming packets in Windows 11 firewall

There is a difference between the two settings, although not in their effect. The difference is that disabling File and Printer Sharing in Windows also disables the firewall rule of "File and ...
  • 423k
1 vote

Windows 10 Firewall warns about being disabled on every login

This one thing was the only thing that helped me out of the many attempts I made. Please enter to prompt Windows+R (WIN+R) for open Run dialog and put gpedit.msc into it and hit enter. Local Group ...
  • 188
1 vote

Command Prompt to Enable ports in Windows Firewall

Open powershell as administrator. To create a rule for UDP port 137, type New-NetFirewallRule -DisplayName "NetBIOS UDP Port 137" -Direction inbound -Profile Any -Action Allow -LocalPort 137 ...
1 vote

How can Windows Firewall be used to further increase security in Windows 10, would it be by blocking particular ports?

The articles you have read probably list ports that should not be lightly opened for inbound connections. By default Windows Firewall blocks all incoming connections, so there are no ports to close - ...
  • 423k
1 vote
Accepted

How do I make a stateful bridge filewall with nftables?

This feature is available since kernel 5.3, but Raspberry chose to not compile it in supplied kernels. As I didn't manage to find the kernel configuration file (usually present as /boot/config-xxx or ...
  • 4,603
1 vote
Accepted

Enable ping in Windows Server for specific IP addresses only?

Add to the netsh advfirewall command the following parameter: remoteip=IPAddress
  • 423k
1 vote
Accepted

Why do some apps need to be explicitly allowed on a firewall and others not?

It depends largely on whether the program needs to receive connections. Web browsers transmit data through the firewall with a unique identifier and the remote server responds back with that same ...
  • 85.7k
1 vote

A particular port on my home raspberry pi results closed if connecting from external wifi, open when using my phone data, any explanation/workaround?

I'm not very familiar with nmap and I was wondering whether that "filtered" meant that the firewall on my current network is filtering the connection or the firewall on the raspberry pi is ...
  • 393k
1 vote

Allow 1 specific IP in block outbound traffic in windows firewall via powershell

You have created a "block all" rule with your first command, but according to Windows Firewall precedence rules block rules are evaluated before allow rules, thus no allow rule can let your ...
  • 210

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