Questions tagged [firewall]
A firewall is a program that controls the incoming and outgoing network traffic on a system. Use this tag for all questions related to firewall configuration and operation.
1,070 questions
499
votes
5
answers
390k
views
How does reverse SSH tunneling work?
As I understand this, firewalls (assuming default settings) deny all incoming traffic that has no prior corresponding outgoing traffic.
Based on Reversing an ssh connection and SSH Tunneling Made ...
73
votes
6
answers
309k
views
Limit SSH access to specific clients by IP address
How do we allow certain set of Private IPs to enter through SSH login(RSA key pair) into Linux Server?
69
votes
3
answers
109k
views
Difference between SNAT and Masquerade
I am confused what's the actual difference between SNAT and Masquerade?
If I want to share my internet connection on local network, should I select SNAT or Masquerade?
59
votes
9
answers
107k
views
UFW: Allow traffic only from a domain with dynamic IP address
I run a VPS which I would like to secure using UFW, allowing connections only to port 80.
However, in order to be able to administer it remotely, I need to keep port 22 open and make it reachable from ...
54
votes
2
answers
151k
views
No route to host with nc but can ping
I'm trying to connect to port 25 with netcat
from one virtual machine to another,
but it's telling me no route to host, although I can ping.
I do have my firewall default policy set to drop,
but I ...
51
votes
5
answers
115k
views
Is there a way to find which iptables rule was responsible for dropping a packet?
I have a system that came with a firewall already in place. The firewall consists of over 1000 iptables rules. One of these rule is dropping packets I don't want dropped. (I know this because I did ...
50
votes
7
answers
125k
views
How to configure Centos 7 firewallD to allow docker containers free access to the host's network ports?
I have docker installed on CentOS 7 and I am running firewallD.
From inside my container, going to the host (default 172.17.42.1)
With firewall on
container# nc -v 172.17.42.1 4243
nc: connect to ...
46
votes
9
answers
284k
views
Whitelist source IP addresses in CentOS 7
I want to set up CentOS 7 firewall such that, all the incoming requests will be blocked except from the originating IP addresses that I whitelist. And for the Whitelist IP addresses all the ports ...
44
votes
1
answer
132k
views
Do you need to reload after adding a rule in ufw?
Do you need to run any of these commands:
sudo ufw reload
sudo ufw disable
sudo ufw enable
after adding a rule via sudo ufw allow?
41
votes
4
answers
229k
views
iptables: allow certain ips and block all other connection
How do I allow certain ips and block all other connection in iptables?
39
votes
1
answer
38k
views
Is it better to set -j REJECT or -j DROP in iptables?
There's an example of iptables rules on archlinux wiki:
# Generated by iptables-save v1.4.18 on Sun Mar 17 14:21:12 2013
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:TCP - [0:0]...
37
votes
2
answers
64k
views
How iptables tables and chains are traversed
I know linux has 3 built-in tables and each of them has its own chains as follow:
FILTER: PREROUTING, FORWARD, POSTROUTING
NAT: PREROUTING, INPUT, OUTPUT, POSTROUTING
MANGLE: PREROUTING, INPUT, ...
33
votes
6
answers
194k
views
How to check whether firewall opened for a port but not listening on the port
We will be deploying a new application to a Server and the application will be listening on port 8443. We have asked Network team to open the firewall for the port 8443 on that server before deploying ...
32
votes
5
answers
70k
views
How can I block a range of IP addresses with an Amazon EC2 instance?
I know a certain range of IP addresses are causing problem with my server, 172.64.*.* what is the best way to block access to my Amazon EC2 instance? Is there a way to do this using security groups or ...
28
votes
4
answers
88k
views
Set some firewall ports to only accept local network connections?
How do I set up the firewall on a system in a LAN so that some ports are only open to connections from the local area network, and not from the outside world?
For example, I have a box running ...