Questions tagged [iptables]

Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.

Filter by
Sorted by
Tagged with
1
vote
1answer
15 views

How do I configure sshguard in Ubuntu 20.04?

I have previously used sshguard successfully on Ubuntu 16.04 by simply installing the sshguard package. When I tried to do the same on 20.04, however, I discovered that it was only mostly working: ...
-1
votes
0answers
33 views

How can I do this? IPTables [closed]

OS: Ubuntu LTS 14.04 IPTables: 1.6.0 My thought: Connect to port: 25565 Port 25565 will redirect to the port 8000 The port 8000 will have a connections limit per second The port 8000 will ...
1
vote
0answers
7 views

IP Tables - Blocking OpenVPN tun0 from accessing ports 80 & 443 on internal network

Im looking for some help with IP tables. I want to set a rule that incoming OpenVPN connections cannot use ports 443 and 80 in the internal network. Just to clarify I wish for them to still be able ...
0
votes
1answer
46 views

netfilter-persistent and iptables malfunction

Desiring to use iptables on ubuntu 18.04, I removed the ufw and installed iptables-persistent netfilter-persistent. Edited the /etc/iptables/rules.v4 and tried to start the netfilter-persistent ...
0
votes
0answers
23 views

Iptables setup on Ubuntu PC hosting Minecraft server

I want to host multiple Minecraft servers on Ubuntu 20.04 and I was wondering if there were specific rules or things I should keep in mind when configuring iptables. It's my first time setting up a ...
0
votes
0answers
20 views

IPtables not blocking certain ports

I've my iptables configuration to allow some communications, but I've noticed that I do not have a specific rule to allow traffic using port TCP 993 (used by my email client). When I open my e-mail ...
1
vote
2answers
77 views

Cannot use apt/curl/wget/git but can Ping

I have a raspberry pi running ubuntu server 20 and cannot connect to the internet, but can use ping. This question has been asked by many before, however the solutions provided in those questions do ...
0
votes
1answer
33 views

Why this script blocking browsing of any website after running it?

i found this script here How to stop the synattack? #!/bin/sh FWVER=0.05 echo "Loading Protect rule set version $FWVER..\n" # The location of the iptables program # IPTABLES=/sbin/iptables #...
0
votes
0answers
22 views

ssh connection stays active even after I delete the UFW rule

I'm on debian buster (10), headless. I setup ufw rules to allow ssh from certain IP's only, that works, I can ssh in , I stay logged in.... From a console, I delete the rule, but from the ssh ...
0
votes
0answers
15 views

My iptables is being automatically modified to drop all output packets. How to debug it?

Recently, I noticed that I wasn't able to connect to any Wi-Fi. After further investigation, I found the following two things I am noticing that whenever I change or join a router Output policy ...
0
votes
0answers
30 views

iptables - drops all connections despite previous rules

I am trying to allow ssh connections from the local network and drop all other connection attempts on the same port (22), here are my current rules in iptables: -A INPUT -s 192.168.0.0/24 -p tcp -m ...
0
votes
0answers
26 views

Unable to use https: ssl3_get_record:wrong version number

I have Ubuntu Server 20.04 Yesterday I'd spent some time trying to open port to my application from outside web. So I was googling how to accomplish that task and made a lot manipulations with ...
1
vote
0answers
49 views

-bash: echo: write error: No such file or directory

I am trying to log iptables actions so I can trouble shoot why a FORWARD rule isn't working and I need to run this command: echo ipt_LOG >/proc/sys/net/netfilter/nf_log/2 this is after loading ...
0
votes
0answers
19 views

iptables port forwarding Ubuntu 18.04

I am trying to update the iptables with some rules. So far, INPUT and OUTPUT rules seem to be working. However, when I add rules for FORWARD not all of them work. For testing I want to have two rules (...
0
votes
0answers
14 views

Setup Firewall rule that will allow only Squid proxy

I am using Ubuntu 19.10. I just jus want that only some selected applications get internet acces, So i've installed squid proxy and configured the application to 127.0.0.1:3128 I've checked the log ...
0
votes
0answers
8 views

How to route traffic on a certain port to another server?

I have the following hardware configuration : BOB, a machine connected to the internet. VM, a virtual machine somewhere on the cloud. PI, a raspberry PI somewhere inside a private network, but with ...
0
votes
0answers
26 views

Ubuntu Firewall configuration

I have two host south and north and middle i have a firewall, I want to set rules that will configure the firewall to allow ping from firewall and nothing else! what rule should I add? How do I set ...
0
votes
0answers
49 views

Forwarding ports on remote OpenVPN machine with UFW

I am trying unsuccessfully to setup port forwarding on a remote machine over an OpenVPN connection. Diagram: ---------------------------------- ---------------------------------- |...
0
votes
1answer
31 views

What does this `iptables -t filter -X` command mean

What does this command mean: iptables -t filter -X What is the purpose of -X? And what's the difference between -X and -F?
0
votes
0answers
13 views

How to setup port forwarding on more than one network interface using same port number?

I have a configuration on a Ubuntu 18 server that I need help with. I have two network interfaces on a AWS EC2 instance with each its own public Elastic IP address: 13.244.83.204 -> 10.0.0.10 (10.0....
0
votes
0answers
49 views

Acces my ssh server from one of my internal LAN

I have attached a picture with my logical scheme of my network to understand better what I'm trying to say. I have 2 routers, one it's from my ISP, let's say R1, and the second one it's a laptop with ...
0
votes
0answers
17 views

Editing iptables rule

I am trying to edit the iptables rule below or at least to increase the limit to 20 or more. How to achieve that? 48 0 0 REJECT tcp -- any any anywhere anywhere ...
2
votes
1answer
516 views

Ubuntu 20.04 Focal, Network Manager Hotspot, 'No Internet connection'

After upgrade Ubuntu 18.04 to 20.04, I noticed Hotspot feature seemed working, and phones were able to connect by wifi, but then they reported No internet connection After checking network-manager ...
0
votes
0answers
39 views

Access internal network through Bridge adapter VirtualBox

I'm using virtualbox 6.0.14 on Windows 10 (45.78.15.115). I created a VM with ubuntu 18:04 and in VBox panel I choose two network adapter: bridged adapter - 45.78.15.116 internal network - 192.168.1....
0
votes
1answer
57 views

Creating/importing iptables rules to ufw

Thank you very much for your time in reviewing my issue. I am currently trying to convert the following iptables to ufw: iptables -A INPUT -p tcp -s 127.0.0.1 --destination-port 443 -j ACCEPT ...
0
votes
0answers
43 views

firewalld vs iptables

I have read on the internet that firwalld or ufw are the frontends of iptables, but I'm wondering why when start firewalld in my system iptables stop, and when I start iptables firewalld stop ?! ...
1
vote
0answers
13 views

How to enable Loopback Access for a particular user using iptables in Ubuntu

I have disabled full network access to one of the users using following command iptables -A OUTPUT -p all -m owner --uid-owner foo -j DROP This disabled everything for the user foo, but I want to ...
0
votes
0answers
28 views

Can not ping from one node to another while both nodes connected via an ethernet cable

I have two ubuntu machines each with two physical NICs. I am trying to create a private network between two of them connecting of one node's NIC with the other node's NIC. In Node 1 when I run ...
0
votes
1answer
32 views

IPSEC site-to-site overlaping networks

we have two sides connected over ipsec using strongswan. both machines ubuntu 16.04 servers. the issue is both end subnets are overlapping. we have tried all possible iptables scenarios to map ...
0
votes
0answers
42 views

Can't connect to SSH over VPN

My setup is the following: I have an ubuntu server 18.04 installation (fresh). I installed openvpn and connect to an vpn server (paid service). I forwarded a few ports on the VPN server. This includes ...
0
votes
1answer
43 views

Fail2ban doesn't persist manual banned IPs after service restart

Just upgraded from f2b v0.9.6 to v0.10.5 on Ubuntu 14.04 using this thread, and it is banning normally according to my old jails that i copied from my previous version. But when i restart the service,...
1
vote
1answer
40 views

iptables unknown cofiguration

today I was just doing regular maintenance on my computer and while checking that iptables was working properly I decided to run the list command,I was expecting to find my regular configuration ...
0
votes
0answers
227 views

getting error problem running iptables when checking ufw status

when I check ufw status on ubuntu I get the following error. ufw status [sudo] password for rock: ERROR: problem running iptables: iptables v1.6.1: can't initialize iptables table `filter': Table ...
1
vote
0answers
14 views

Linux gateway is forwarding traffic to its own gateway when tunnel is down

I have a box (192.168.1.2) that connects to a VPN creating a tunnel. This box has a 192.168.1.1 default gateway which is my router's internal address. The rest of my network has 192.168.1.2 (...
0
votes
0answers
23 views

SSH into Virtual Machine from outside of NAT router

I have a virtual machine on my host which I am trying to SSH from outside a NAT router. Both the host and the virtual machine are using the wifi interface and so have the same IP assigned by the home ...
0
votes
0answers
22 views

Can’t ping any server and connect to the internet

After I loaded toriptables 2 rules,it connects to internet but can’t ping any server even the router,I flushed all iptable rules,but still I cannot enter any server.I restarted my computer,restarted ...
0
votes
0answers
38 views

VSFTPD connect from external IP

I have VSFTPD installed on my Ubuntu 18.04 LTS, cant connect from public IP. Here is my config: listen=YES listen_ipv6=NO anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 ...
1
vote
1answer
96 views

No SSH access after accidentally denied ssh in ufw/iptables on Snappy Ubuntu Core

I´m running Snappy Ubuntu Core 18.04 on Intel Nuc, located on other location then where I live permanently. Now I have accidentally denied SSH in iptables with use of ufw and SSH connection is not ...
1
vote
0answers
25 views

apt-get update only works through a proxy

I have a ubuntu server (Ubuntu 16.04.6 LTS) that hosts KVM VPS, manages through Virtualizor (3.0.2). Inside those vps, I am unable to perform apt-get update. The command works on the main server ...
0
votes
0answers
21 views

Load balance 2 USB LTE modems to share on WAN ethernet

I am looking to setup a Raspberry Pi 4 as a linux dual service router/server. Is there any packages to install and configure so that I can take 2 4G LTE services connected by USB and load balance ...
0
votes
0answers
49 views

iptables for apache server

I have a Linux server apache2 (Ubuntu 18.04.4 LTS) and i woud like secure it but my iptables deny connection... Apache2 listen port 443 only and a domain name redirects to my server. I know very ...
1
vote
1answer
65 views

Ubuntu Server - “Virtual” Network Interface with Internet Access

I have an Ubuntu 18.04 server with one public network interface (eth0). I'm trying to create additional "virtual" network interfaces that will also be able to access the internet with NAT rules set up....
5
votes
2answers
425 views

How to respond to sshd brute force attacks

I recently received a notification from OSSEC HIDS that warns me about a SSHD brute force attack. Below I report the whole message for the sake of completeness: OSSEC HIDS Notification. 2020 Mar 03 ...
0
votes
0answers
53 views

No kernel messages are logged in kern.log

I see that the kern.log file doesn't show any message. I did put the iptables log in kern.log this way: sudo iptables -A INPUT Until yesterday, this command was working, but today I needed to add ...
1
vote
1answer
73 views

How to block WINE app internet access persistently

I've followed this guide: How to block internet access for wine applications? And created the following rules: sudo addgroup no-internet # Create group "no-internet" sudo adduser $USER no-internet ...
2
votes
1answer
38 views

Adding negation to the time match of iptables. What does it mean?

I want to allow access to traffic only from 07:00 to 15:00. I want to use negation since I have other iptables rules. Does using negation in the following exemple meet my requirements about time slot?...
0
votes
0answers
49 views

iptable change that survives a reboot [duplicate]

I am using the following command to make my UniFi Controller instance available at https://unifi.mydomain.org instead of https://unifi.mydomain.org:8443. sudo iptables -t nat -I PREROUTING -p tcp --...
1
vote
1answer
36 views

How do I limit access to a service/port by IP address?

I'm running something on port 3000 and I want to offer this service on port 3000 only to specific users (by IP address). How do I do that? Is that done with ufw or iptables (both of which I know ...
1
vote
2answers
106 views

Random SSH IP from China

My nas server running ubuntu-server 19 has the 22 port open for remote access and I was just casually looking at netstat when I noticed a strange IP. Turns out it's from china and when I looked it up, ...
4
votes
1answer
329 views

Iptables Restricting Access By Time

How to control internet time access for each IP? How to add time to this rule: iptables -I FORWARD -s 192.168.0.56 -j ACCEPT? I tried this iptables -I FORWARD -s 192.168.0.56 -m time --timestart ...

1
2 3 4 5
21