Questions tagged [firewall]
a technological barrier designed to prevent unauthorized or unwanted communications between computer networks or hosts
1,234
questions
0
votes
1
answer
348
views
Disallow any incoming connection but allow the only added iptables rules
I want to disallow any incoming connection from any IP address except for those who are allowed in an iptables rule like that:
sudo iptables -A INPUT -p tcp --syn -s 147.0.0.0 --dport 5566 -m ...
3
votes
2
answers
6k
views
Ubuntu Server 18.04.1 Netplan and UFW
Ok, so I want to make a router using Ubuntu Server 18.04 ( already have the hardware and it all works, I have IPfire currently on it). I’ve looked at all the router distros and they seem rather ...
15
votes
1
answer
6k
views
UFW Allows 22 for IPv4 and IPv6 but SSH Disconnects When Enabling
sudo ufw disable followed by sudo ufw enable kicks me out of SSH
DMESG reports
[UFW BLOCK] IN=eth0 OUT= MAC=30:........ SRC=192.168.1.me DST=192.168.1.server LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=...
0
votes
0
answers
187
views
Why is this rule in Gufw, to prevent Firefox from communicating to a HTTP server, not working?
The rule I'm having problems with is the following:
After setting it, I'm still able to use Firefox to connect to a HTTP server. Why is that rule not working? From what I understand, the reply of the ...
0
votes
1
answer
4k
views
Allow port 53 for a DNS server
I am trying to use my ubuntu machine as DNS server. I have installed the bind 9 package.
I am using dig to check the DNS server. However I am getting a ICMP type 3 code 3 message on the client.
This ...
1
vote
1
answer
939
views
I typed iptables -F by mistake, how to undo? [duplicate]
I typed iptables -F by mistake, how can I undo it?
I see now strange activity on my routers IP, scanned it and saw that strange ports are open. How can I block these ports?
0
votes
0
answers
58
views
allowed 8388 but found some other ports still open
my code
sudo ufw allow 8388
but if I scanned the all ports found that ports
22 80 110 443
also opened
if I checked the status of ufw
sudo ufw status
it only displayed 8388 was opened
To ...
1
vote
0
answers
84
views
Listen to port and if request prefix is correct return result
I would like to setup Ubuntu to act as a dictionary . It should accept string from client and if string prefix is correct (acts as one time password) then get the rest of the string, process it and ...
0
votes
2
answers
4k
views
DNS Resolution fails with UFW & OpenVPN (ProtonVPN Server)
I have an issue I've been trying to solve for a few days now - I'm working on a relatively fresh installation of Ubuntu 18.04, I enabled UFW and configured it with the following rules.
sudo ufw ...
1
vote
1
answer
4k
views
iptables does not add/list PREROUTING rules
I'm trying to add all of the anti-DDoSing rules from JavaPipe after removing UFW from my system and deleting all of the ufw chains (though the referenced answer didn't work. I had to run iptables -F ...
1
vote
1
answer
809
views
I registered IP DENY on Ubuntu UFW but it does not work
182.100.67.235 IP is still connected.
How can I do?
ufw status
Status: active
To Action From
-- ------ ----
[ 1] Postfix ...
1
vote
1
answer
14k
views
how to open port 3306
I'm trying to allow remote traffic to my mysql server.
I changed my bind address in my mysqld.cnf to 0.0.0.0, and ran sudo ufw allow 3306/tcp but I don't think my port 3306 is allowing traffic.
I'm ...
1
vote
1
answer
232
views
Why do rules I create in graphic firewall (gufw) get deleted (force deleted)?
I used the graphic firewall in 18.04 to create rules for 3 services. At the time they were created, the rules were fine and the items accessible from other machines on my home network.
The next day, ...
1
vote
1
answer
136
views
Do work iptables across all users at the same time?
I'm running Lubuntu 17.10 and I have two accounts; lightning and scholar. When logged into the desktop as scholar I want to block traffic to-and-from https://www.facebook.com/ on scholar, even while ...
0
votes
1
answer
4k
views
Lubuntu 18.04 LTS - Is it the case to enable or install a firewall?
I have an old Acer Aspire One AOA150/ZG5,with only 1 Gb of RAM.I have a firewall already enabled on my router.
I read this: https://wiki.ubuntu.com/BasicSecurity/Firewall and much more about security....
0
votes
0
answers
192
views
allow my laptop to ssh to my server through ufw from any ip
What are the different options for doing this? Allow any IP but require a certificate? Allow any ip but for added security require strong passwords? I suppose if there is an option for mac address ...
0
votes
1
answer
2k
views
Iptables bad argument
I'm writing an iptables Bash script, and I can't figure out why I get the below error:
Variables
iptables=/sbin/iptables
internet_int=ens33
lan_int=ens37
lan_addr=172.16.30.0/24
Rule
#lan -> ...
14
votes
6
answers
28k
views
How do I get ufw to start on boot?
UFW is not starting for me on boot. My /etc/ufw/ufw.conf file looks like this:
# /etc/ufw/ufw.conf
#
# Set to yes to start on boot. If setting this remotely, be sure to add a rule
# to allow your ...
4
votes
1
answer
3k
views
How can I put speed limits on ports?
I have UFW enabled, so the solution should not interfere with it. It should also work after reboot.
I currently know these commands which limit the data usage of ports:
sudo iptables -I OUTPUT -p ...
2
votes
1
answer
5k
views
Is VPN + UFW (As a Killswitch) broken in 18.04?
I have been using Ubuntu (Lubuntu Distro) since 16.04 and have always used a VPN + UFW as a killswitch. It's a very simple thing to do. Especially with the GUFW GUI.
First, you simply deny incoming / ...
2
votes
1
answer
2k
views
wget localhost - connection refused - Atlassian Installation on AWS
I am trying to debug why I get a connection error when trying to setup Confluence on an AWS Instance.
I tried to do a simple test command on the CLI and got an error "Connection Refused" which makes ...
0
votes
1
answer
1k
views
Blocking all ip addresses except one - Ubuntu server 16 - iptables
I have 2 routers. On the second router I want to block all the incoming traffic, only one server should have access to the internet.
My rules are as follows.
sudo iptables -A INPUT -p tcp --dport ...
0
votes
1
answer
1k
views
Captive Portal Using PHP and iptables Firewall on Linux
I am trying to make a captive portal following this tutorial . I am stuck in this command
sudo iptables -t mangle -I internet 1 -m mac --mac-source USER-MAC-ADDRESS-HERE -j RETURN
Here whose MAC ...
1
vote
2
answers
1k
views
Ubuntu UFW firewall always block port first time
First time when the system starts ufw blocks all ports that are allowed.
If I disable ufw and enable again, they start to be allowed;
I don't understand the issue, please, help.
See my ...
0
votes
1
answer
410
views
Cannot connect to remote MySQL server
I've traditionally used SSH tunneling to connect to my remote MySQL server. However, I am enabling replication to a slave instance and so am attempting to get direct connections to port 3306 working ...
1
vote
2
answers
5k
views
Set UFW to accept connection from local source only
I have a server with Ubuntu server and UFW firewall. Server runs docker, and in docker two containers. One is a proxy server, another is some other service with WebUI on port 42111. This service has ...
0
votes
1
answer
2k
views
18.04 VPN & UFW firewall issue
Went from 16.04, connecting to VPN fine through Network Manager on Xenial. Under 18.04 it doesn't connect, settings are unchanged. Get the grey icon which vanishes after 10 seconds. I've tried the '...
4
votes
1
answer
4k
views
UFW not blocking although DROP policy
On Ubuntu 16.04, I installed ufw and configured it so it has the following status (sudo ufw status verbose):
Status: active
Logging: on (full)
Default: deny (incoming), allow (outgoing), deny (routed)...
1
vote
1
answer
583
views
Is there a Firewall for Ubuntu which doesn't need to be turned on at every reboot like Gufw
Gufw turns itself off at every reboot.
I've entered all the commands in terminals.... sudo systemctl enable ufw
sudo systemctl start ufw and so on.
This is a major security risk.
Why has a firewall ...
2
votes
0
answers
793
views
How do I use a Whitelist approach for some files with App Armor?
I'm pretty new to using AppArmor and am unaware of all it's features. I was wondering if it is possible to apply Whitelisting behavior to some files with App Armor?
I think whitelisting and ...
0
votes
1
answer
1k
views
UFW ignores his rules
I often search in the access.log for IP of services that do not interest me (E. Semrush, Mj12bot, Megaindex etc.) and add them to UFW.
But often adding the rule to UFW responds like this:
ufw deny ...
3
votes
0
answers
42
views
a More Active(prompting) GUFW
Excuse me Please:
I am currently in the process of installing/configuring Ubuntu 16.x, and will be installing GUFW.
I would prefer to avoid passive applications, and would that the "firewall" ...
1
vote
0
answers
58
views
Cannot access apache form outside network
I cannot access apache from outsid the network. From "inside", it works.
In the Firewall "Apache Full" is enabled.
sudo iptables -vL
Returns this:
Chain INPUT (policy DROP 4 packets, 144 bytes)
...
2
votes
1
answer
3k
views
Transmission can't download due to ufw
I can't download anything in transmission because ufw firewall didn't allow
My ufw status is given below:
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (...
1
vote
1
answer
4k
views
ufw application profile to allow for specific source ports
I have UFW and PlexMediaServer setup on my server. I have a UFW profile for PMS as so:
[PlexMediaServer]
title=Plex Media Server
description=This opens up PlexMediaServer for http (32400), upnp, and ...
1
vote
0
answers
337
views
"ufw status" becomes inactive without rebooting. is fail2ban service affecting ufw firewall?
"ufw status" becomes inactive without rebooting. ("Service ufw status" remains active though, "iptables -L" also turns empty) I have setup ufw auto enabling upon reboot. But without rebooting the ...
1
vote
2
answers
929
views
Setting and configuring a firewall
Newbie here.
I've found the following rules to set a firewall, (from the book how Linux works)
iptables -P INPUT DROP # the default policy
iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -A ...
1
vote
0
answers
874
views
How to control internet access (not LAN) for specific executable
what I'd like to know is a way of denying internet access for one specific executable, like in Windows Firewall, where you can select a specific .exe-File and restrict it's access to internet.
Also, ...
7
votes
2
answers
14k
views
UFW rules disappear after manually adding them to user.rules?
I need to add rules to ufw by editing the user.rules for some reason, when I add rules to it and do sudo ufw reload, the rules are gone. Any reason why this happens and how can I add rules by manually ...
5
votes
1
answer
19k
views
ufw firewall deny outgoing but allow browser
I want to configure ufw firewall in a way, where I can allow "browser" surfing but deny all another outgoing.
I have denied outgoing using gufw but it blocked surfing too, so, I allowed "outgoing" ...
3
votes
0
answers
5k
views
Getting Error trying to install install ufw on a freshly installes ubuntu 16.04
On a fresh Ubuntu 16.04 LTS install after installing nginx, php, mysql I was trying to install ufw.
First, when I tried to allow Port 22/OpenSSH I came across an iptables error.
ERROR: initcaps
[...
0
votes
0
answers
309
views
Internet Problems ( This site cant be reached )
I have a problem in connecting to some websites. For example, Google, Gmail, Yahoo websites have no problem. but I am not able to open websites like askubuntu, nvidia, facebook. Kindly please help me ...
2
votes
1
answer
2k
views
Disabled ports with UFW but outside scan still shows them as open?
UFW status verbose:
And this is the result from an outside scan from pentest-tools.com
So, my understanding is that all ports BUT 22 and 443 should be closed, but some other still appear as open ...
1
vote
0
answers
1k
views
How do I use iptables with bridge-utils to block a MAC address?
I have a server with eth0 and eth1. To create a bridge I installed bridge-utils:
sudo apt-get install bridge-utils -y
And edited the /etc/network/interfaces with sudo nano /etc/network/interfaces:
...
0
votes
1
answer
263
views
Enable UFW noninteractively (-y failed)
How to enable ufw noninteractively?
sudo enable ufw -y does not achieve that. The -y is ignored.
2
votes
0
answers
898
views
Allowed port 22 with UFW and installed SSHguard but can't SSH
I've installed a new Ubuntu 16.04 with SSHguard (apt-get install sshguard), and then enabled UFW:
sudo ufw enable
I then allowed some ports:
sudo ufw allow 22,25,80,443,9000/tcp
Yet I can't login ...
17
votes
3
answers
44k
views
How do I allow multiple ports simultaneously in UFW?
I've installed a new Ubuntu 16.04 and enabled ufw:
ufw enable
I tried these ways to unfilter multiple ports at once:
ufw allow 22/tcp 25/tcp 80/tcp 443/tcp 9000/tcp
ufw allow 22/tcp, 25/tcp, 80/tcp,...
0
votes
0
answers
440
views
"PSAD config File Does Not Contain Email Address" however, it does
I installed PSAD and I attempted to configure the system. I set my email address and my hostname, however, every time I run psad I get this error:
"[*] The config file "/etc/psad/psad.conf" does not ...
3
votes
1
answer
323
views
Can sshguard filter TCP+UPD ports? If so, how to prevent that?
I understand that sshguard guards from Brute Force Attacks on SSH, but does it also serve a iptables manager to filter TCP+UPD ports?
I could indeed use ufw to filter all ports, then unfilter the ...
1
vote
1
answer
537
views
Asking help with iptables
Firstly I want to ask why my rules.v4 looks so complicated after using: iptables -F. I thought it will be empty after flushing:
# Generated by iptables-save v1.6.0 on Tue Jan 9 21:25:13 2018
*filter
...