Skip to main content
find the real problem
Source Link
pioupiou
  • 926
  • 1
  • 10
  • 23

I enable ufw and I tried to block all the traffic from one server, but I can't.

It only blocks ssh, all the other ports are open. I test it with telnet.

I want to allow all ports for some IPs, and block all ports if the IP is not there.

I have these rules:

sudo ufw status verbose

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip 

UPDATE

Also, test from iptables

iptables --policy INPUT DROP

I tried telnet for ssh, is blocking but for other services, I can still access them.

Any ideas? I don't want to create default deny for outgoing, and then whitelist every port iI want.

UPDATE

The problem is that the services are running inside the container. If I create a new listener with nc the firewall is blocking that connection.

How can I block the incoming traffic for containers?

I enable ufw and I tried to block all the traffic from one server, but I can't.

It only blocks ssh, all the other ports are open. I test it with telnet.

I want to allow all ports for some IPs, and block all ports if the IP is not there.

I have these rules:

sudo ufw status verbose

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip 

UPDATE

Also, test from iptables

iptables --policy INPUT DROP

I tried telnet for ssh, is blocking but for other services, I can still access them.

Any ideas? I don't want to create default deny for outgoing, and then whitelist every port i want.

I enable ufw and I tried to block all the traffic from one server, but I can't.

It only blocks ssh, all the other ports are open. I test it with telnet.

I want to allow all ports for some IPs, and block all ports if the IP is not there.

I have these rules:

sudo ufw status verbose

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip 

UPDATE

Also, test from iptables

iptables --policy INPUT DROP

I tried telnet for ssh, is blocking but for other services, I can still access them.

Any ideas? I don't want to create default deny for outgoing, and then whitelist every port I want.

UPDATE

The problem is that the services are running inside the container. If I create a new listener with nc the firewall is blocking that connection.

How can I block the incoming traffic for containers?

add iptables
Source Link
pioupiou
  • 926
  • 1
  • 10
  • 23

ufw & iptables don't block incoming connection

I enable ufw and I tried to block all the traffic from one server, but I can't.

It only blocks ssh, all the other ports are open. I test it with telnet.

I want to allow all ports for some IPs, and block all ports if the IP is not there.

I have these rules:

sudo ufw status verbose

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip 

UPDATE

Also, test from iptables

iptables --policy INPUT DROP

I tried telnet for ssh, is blocking but for other services, I can still access them.

Any ideas? I don't want to create default deny for outgoing, and then whitelist every port i want.

ufw don't block incoming connection

I enable ufw and I tried to block all the traffic from one server, but I can't.

It only blocks ssh, all the other ports are open. I test it with telnet.

I want to allow all ports for some IPs, and block all ports if the IP is not there.

I have these rules:

sudo ufw status verbose

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip 

ufw & iptables don't block incoming connection

I enable ufw and I tried to block all the traffic from one server, but I can't.

It only blocks ssh, all the other ports are open. I test it with telnet.

I want to allow all ports for some IPs, and block all ports if the IP is not there.

I have these rules:

sudo ufw status verbose

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip 

UPDATE

Also, test from iptables

iptables --policy INPUT DROP

I tried telnet for ssh, is blocking but for other services, I can still access them.

Any ideas? I don't want to create default deny for outgoing, and then whitelist every port i want.

Source Link
pioupiou
  • 926
  • 1
  • 10
  • 23

ufw don't block incoming connection

I enable ufw and I tried to block all the traffic from one server, but I can't.

It only blocks ssh, all the other ports are open. I test it with telnet.

I want to allow all ports for some IPs, and block all ports if the IP is not there.

I have these rules:

sudo ufw status verbose

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip