Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [ufw]

Uncomplicated Firewall is a firewall configuration tool for Linux. It acts as a frontend to iptables. Originally designed for Ubuntu, it is available on many Linux distributions.

0
votes
1answer
16 views

how do i check whether an ufw rule is reboot-safe?

So I have just added a firewall rule using ufw. How do I know whether I have to do additional steps to make this rule also automatically present after reboot? (2nd question, but less important to me:...
0
votes
0answers
30 views

ufw not enabled on boot

OS is Trisquel 8.0 (Ubuntu 16.04 LTS derived), kernel 4.4.0-131-generic I've reached the hair-tearing stage with ufw, which refuses to start up properly on system start. Have tried: Editing /etc/ufw/...
0
votes
1answer
18 views

UFW comment existing rule?

I'm trying to comment an existing ufw firewall rule, but i can't find the exact command I can easily add a rule with comment like sudo ufw allow in on eth0 to any port 80 comment 'test' but how i ...
1
vote
3answers
64 views

Test if UFW firewall change would prevent me from reconnecting

I want to manage UFW firewall rules on a number of remote Ubuntu 18.04 machines using Ansible. If a change to the firewall rules prevents me from re-connecting to the machines via SSH that would be ...
0
votes
1answer
47 views

Firewall completely disabled but still cant access port - Centos7

I have disabled selinux in /etc/sysconfig/selinux: SELINUX=disabled rebooted and disabled both firewalld and iptables services. # sestatus SELinux status: disabled # systemctl ...
0
votes
0answers
64 views

Port Forwarding from Router / Public IP to server localhost:80

I have a 4G router connected to the NIC of a Ubuntu 18.04 server. I need to be able to use the public IP of the router to access the webpage hosted on the server. I have correctly configured port ...
0
votes
0answers
9 views

How to verify conformity of firewall/iptables rules with actual ufw rules?

ufw is awesome for setting up firewall rules. I'm not well versed regarding iptables rules, and therefore ufw is a really helpfull. When shooting iptables -L , there are a ton of rules added and set-...
0
votes
2answers
86 views

Using UFW to completely block internet provider [duplicate]

I am facing a DDOS attack from a few hundred IP addresses, all of them coming from various cities in India and have the same organization: "................ for GPRS Service". (I'm not mentioning the ...
0
votes
1answer
155 views

Connecting using ip address but not using web server name

I am able to access the website of a server (running Linux Mint 18 Sylvia) that uses an http like: http://myserver.house.pckhrest.edu I can not do remote connection to myserver.house.pckhrest.edu ...
0
votes
0answers
26 views

allow certain IPs to access port listening on loopback

I have docker running some services, binding the ports with 127.0.0.1:8080:8080, so they listen only on localhost. If I change that to 8080:8080, the ports will be open because Docker adds some rules ...
0
votes
2answers
63 views

Forward traffic from port 22 to virtual computer on ubuntu

I'm trying to forward traffic from port 22 on a host machine to port 22 on a virtual machine. My host is running ubuntu. I have tried to execute this command on my host: iptables -t nat -A ...
0
votes
0answers
89 views

Route and block HTTPS requests by domain with privoxy and havp

I'm configuring Privoxy and HAVP to run with OpenVPN and i'm stuck trying to block websites that use HTTPS (not all of them, some of them). I'm using the following in before.rules of UFW to redirect ...
0
votes
1answer
34 views

OpenVPN Block Server Traffic on Client Side

I'm trying to make a Reverse proxy running OpenVPN Server to expose some ports on a client to the internet. I only want to give the Reverse Proxy access to a webserver hosted in docker at this stage ...
0
votes
1answer
36 views

AWS EC2 instance: security groups and firewalls

On an EC2 instance, you can configure a security group to have what seem to be the same as firewall rules (e.g. default drop all traffic with selectively allowing port based, inbound or outbound ...
0
votes
0answers
60 views

set outgoing ip for specific user with ufw

What I want to do is to set a specific outgoing ip (not the main ip address) for uid 1004. Could anyone point out what's wrong with the code? The OS is Ubuntu 18.04. xx.xx.xx.xx represents an actual ...
1
vote
1answer
100 views

Slow rules inserting in UFW

I need to block about 10 000 IP addresses in my firewall, I have all IP addresses in file, so I run this command from command line: while read line; do sudo ufw insert 1 deny from $line; done < ...
0
votes
0answers
60 views

ufw conditional interfaces - Dynamic Routing only when an interface has an active connection

I have an interesting setup. Two Wireless Cards and One Ethernet Card all in one box. Sometimes the device is connected to the internet via wired Ethernet interface, and sometimes via Wireless ...
0
votes
1answer
62 views

packets from port 1900 to port 49125

I have a TP-Link Archer C7 router and a Debian 9.4 server that has UFW installed on it. I was looking through the UFW logs and it looks like my router is sending requests to port 49125 of server every ...
0
votes
0answers
37 views

UFW deny not banning

I've recently moved our server to AWS and am having difficulty getting UFW to ban IPs, I've never had the issue when running our server locally. I've tried the typical suggestions (ordering the rules, ...
0
votes
0answers
24 views

DDOS attack on cloudflare attached server

So I have like 4 Digital Ocean droplets and they all are attached to DNS through cloudflare. The problem is they all are being attackers in different times of month by millions of IPs and some of them ...
0
votes
1answer
83 views

Troubleshooting a problematic IPTABLE rule

Background I am very new to Fail2Ban, UFW, and IPTABLES. The rules in place on the VM in question, were mostly generated automatically. Some I added after following instructions for such. One is ...
0
votes
0answers
38 views

Closed ports with UFW but outside s can still shows them as open?

Those are my UFW settings at a Ubuntu 16.04 VPS according to them everything but 22 and 443 should be closed for inbound right? Well this is the result of an outside scan: enter image description ...
0
votes
1answer
71 views

No route to port 80 while HTTPS works

I can't figure out how to troubleshoot this. Whenever I try opening a website using HTTP, I get something like: $ wget example.com Connecting to example.com (example.com)|<IP_HERE>|:80... ...
0
votes
0answers
238 views

forwarding ports between vagrant windows 10 host and ubuntu guest fails

I am running a web server inside a guest ubuntu xenial64 os running on top of vagrant using hyper-v in a windows 10 machine. I know the web server is running o.k. because I was able to locally telnet ...
0
votes
0answers
133 views

XML-RPC Attack, how to solve it

I'm receiving a lot of http POST requests from one single IP to this file: "xmlrpc.php" which collapsed my site (Wordpress). I have my WP running on an Nginx and I've intalled UFW. I blocked the ...
0
votes
1answer
87 views

Huge iptables list, can I reset this?

I've been trying to block an IP that is trying to break into a Wordpress installation on my server. At first I entered a command to drop connections to it using IPTables, but I could still see it ...
0
votes
0answers
313 views

UFW forward port to internal IP

I am running Ubuntu server 16.04. I want traffic coming in at port 80 and port 443 to go to one of my LXC containers I am running (let's say its IP is 10.20.0.100). Is it possible with UFW to have ...
0
votes
2answers
279 views

Docker, UFW and IP Tables

first of all, i kind of new to docker / linux / ufw and stuff! What i´m doing: I´m creating a docker container which exposes a port. in this case its 8080. The container behaves as expected. ...
-1
votes
1answer
36 views

Accessing resources on server that I'm connected to via OpenVPN

I run a pretty basic OpenVPN server that is set up along the lines of the guide from DigitalOcean. It uses UFW to only allow incoming connections for OpenVPN (default port) and SSH. Now, I also want ...
1
vote
1answer
373 views

Replace default iptables with ufw rules

I wanted to test removing all default iptable rules and replacing them with my own, using ufw. I have a very simple LAN that just needs 1/2 dozen ports, and iptable defaults are causing major ...
0
votes
1answer
29 views

Redirecting denied connections to ports 80, 443 to other IP that hosts an error page

Okay, here we go.. I am using UFW on my Debian 8 server to block all incoming connections on ports 80 and 443, except for those that I have allowed. However, I need to redirect those dropped ...
0
votes
0answers
160 views

ufw rules not properly working to access elasticsearch from outside from certain ips

I have the following rules in my ufw. What i want to allow is access to port 9200 (elasticsearch) from certain IPs. I obviously added some rules but I can't access es from outside with the added IP if ...
0
votes
0answers
162 views

Ubuntu 14.04 IPv6 setup with radvd and ufw

I am bringing up a rack of server is a co-hosting location and so far I have been using it with IPv4 and using NAT for the in-rack network. I want to add IPv6 so that I can address all the processors ...
0
votes
1answer
126 views

Linux: Bridging two ethernet connections together to allow second host onto first network

Situation: Network A <-> Server <-> Client Host I want to allow the client host to access network A via a bridge, allowing both hosts access to network A over one ethernet connection. These ...
2
votes
1answer
634 views

UFW rules for VPN [closed]

I have set up a VPN box on my lan. My lan gateway is 192.168.2.1. I set port forwarding on my router to allow incoming VNP connections. The VPN box LAN address is 192.168.2.42 The tun0 interface ...
0
votes
2answers
807 views

Blocking domain via ufw and iptables

Does anyone know a way to block the domain name of a website (www.firstlightfcu.org) while still allowing access to the site using the IP address (174.122.168.43)? I tried blocking the website using ...
0
votes
1answer
66 views

Traffic from banned ip still appearing in nginx log

I created a rule using UFW which banned an ip address with the following command sudo ufw insert 1 deny from <ip address> to any Now if I try to SSH to the server from that IP address it ...
-1
votes
2answers
50 views

Unable to access web application deployed on my Ubuntu 16.04 machine from other devices/laptops on the home LAN [duplicate]

I have made 2 webapps(I'm learning web development basics). One using ruby-on-rails and another using apache2. My laptop's local IP is 192.168.122.1. The following 2 urls are working on my machine : ...
0
votes
0answers
33 views

Does not access to my website from anywhere but from office

I set up a firewall for my server using ufw. This is the result of sudo ufw status: To Action From -- ------ ---- 9200 ...
1
vote
1answer
346 views

UFW doesn't block the mongodb port

I have blocked 27018 using ufw but still, I can connect to that port from my computer using mongo command line tool. is there any solution to this? I tried to run ufw reload but result is still the ...
2
votes
0answers
138 views

How can I prevent clients from communicating with each other when setting up and OpenVPN server?

I'm trying to configure my OpenVPN server (Ubuntu 16.04) such that clients cannot communicate with any other device except for the OpenVPN server itself. I've tried removing client-to-client from my ...
-1
votes
1answer
126 views

Ubuntu Server firewall blocks the IP I use to test it with [closed]

My ubuntu server firewall blocks the ip I am accessing it from. Here is iptables -L Chain INPUT (policy DROP) target prot opt source destination DROP all -- 192.168.1.1 ...
-3
votes
1answer
360 views

Linux router with UFW - how to block internet access for an IP address

I have an Ubuntu machine setup as a home internet router. I would like to block internet access for particular IP address or mac address. Is it easily possible? I use UFW as a firewall.
0
votes
0answers
127 views

Docker with Nginx, Portainer, HHVM, and UFW

I have a vps, running docker, with nginx and hhvm. So far, so good: The images I use are the official nginx, and brunoric/hhvm To have it play nicely with UFW, I had to disable the use of iptables by ...
16
votes
1answer
1k views

Why is ping working when all incoming and outgoing connections are blocked in the firewall?

I have DENIED both incoming and outgoing connections using ufw on Debian VPS. There is only one rule defined, which is to allow connection to SSH port. ufw is enabled and working. Yet I am still ...
0
votes
0answers
76 views

Can't Close Port 21

I have this strange issue where I can't close port 21. I'm using Digital Ocean running Debian Stretch 9. I run nmap against my domain and it shows port 21 is open. For reference the domain is: https:/...
0
votes
1answer
1k views

UFW settings on Ubuntu 16.04 serving a MySQL database to a few web servers

I am setting up an Ubuntu 16.04 server that will be used exclusively for incoming and outgoing MySQL database requests to/from some web servers. Using UFW I am wondering if I could block everything ...
1
vote
0answers
769 views

Exim not Listening on port 465 or 587 for TLS connection

I am configuring Exim on a Ubuntu server to send and receive mails via TLS. Followed many guides which shows on how to configure Exim with TLS but still my Exim doesn't listen on 465 or 587 Exim ...
0
votes
0answers
903 views

Add multiple ip addresses to ufw rules

I have a list of IP addresses from ManageWP I want to whitelist the addresses in ufw and allow only these ip addresses to connect to mysql on port 3306. I have written this script to do this but it ...
0
votes
0answers
214 views

UFW: Allow 2 external IPs + loopback, deny everything else

I have a ubuntu server with IPv4 and IPv6 networking enabled. Currently, network config looks like this: # The loopback network interface auto lo iface lo inet loopback # The primary network ...