Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
132 views

How to block all connections on all ports using iptables?

I am trying to protect myself from ddos and limiting all users with more then 5 connection request to connect to my server. I am trying to use this one, but it is not working, it actually blocks even ...
MaxIT's user avatar
  • 1
0 votes
1 answer
129 views

How to exclude 1 ip from iptable rules?

I want to block all ip's with > 200 connections to access my server with this rule: iptables -A INPUT -p udp --dport 100:65535 -m connlimit --connlimit-above 200 -j REJECT but at the same time I ...
MaxIT's user avatar
  • 1
0 votes
0 answers
71 views

Script that will scan for number of connections and ban those above 100

since I lately have some DDOS attacks, i need help in creating the script that will do following: -Screen the IPs on all ports with total number of connections using netstat -Ban all IP's that are ...
MaxIT's user avatar
  • 1
-1 votes
1 answer
1k views

How to redirection traffic between interfaces on ubuntu 18.04

i have server that has two interfaces (enp1s0 : 192.168.1.10 and enp2s0 : 10.20.30.30), enp1s0 is public interface that we can connect to server with it and enp2s0 is private and isolate interface. on ...
arminbiklari's user avatar
1 vote
0 answers
18 views

ufw differentiates block-and-log from unmatched log

I insert block rules using this kind of statements sudo ufw insert 1 deny log from 45.136.228.230/24 I have a few hundreds of such deny-log rules. ufw will block the IP and log the event. However, ...
Gqqnbig's user avatar
  • 689
2 votes
0 answers
3k views

How to mirror traffic on one interface to another?

I'm basically trying to implement a tap-interface on wlan0 interface (Ubuntu 18.04), i.e., mirror every packet going through wlan0 (incoming and outgoing) to another interface (tap0). I've got tap0 up ...
Redford Dirk's user avatar
1 vote
1 answer
1k views

UFW not blocking traffic to microk8s cluster

I successfully deployed k8s pod with service of type NodePort in microk8s cluster. Now when I enable ufw and try to deny incoming traffic to the exposed port 31001 using command ```ufw deny 31001``` , ...
ajay vasudevan's user avatar
0 votes
1 answer
7k views

Ubuntu 18.04 route delete permanently

I want to delete a route permanently on Ubuntu 18.04. The route is the following,route -n: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface ....
question_1's user avatar
0 votes
0 answers
90 views

Port forwarding with 18.04.4 LTS

i have 1 pc running ubuntu 18.04.4 LTS. this pc has 2 network cards: enp37s0 (onboard gigabit nic) and enp38s0 (additional pcie gbit nic). enp37s0 is connected DIRECTLY to the internet by cable ...
Dario Buonpensiere's user avatar
1 vote
1 answer
3k 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 ...
George Udosen's user avatar
0 votes
0 answers
164 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 ...
kr90's user avatar
  • 11
2 votes
0 answers
8k 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 ...
Ciasto piekarz's user avatar
0 votes
0 answers
159 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 ...
Alexander Man's user avatar
5 votes
2 answers
1k 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 ...
Asarluhi's user avatar
  • 1,667
1 vote
1 answer
2k views

How can I remove an iptables rule?

I would like to temporarily add the following iptables rule to see if allowing inbound traffic on port 5000 I will be able to connect to my docker container and the web server running within it: $ ...
Asarluhi's user avatar
  • 1,667
2 votes
2 answers
976 views

IP Table rules to swap traffic on two interfaces

The Issue: I have two interfaces, vlan.202 and tap0. vlan.202 is my VLAN for VPN clients and originally I just used to tunnel all my VPN clients onto a random subnet and have them share my host IP, ...
Sean Mitchell's user avatar
1 vote
2 answers
1k views

ubuntu 18.04 torrent seeding problem

I wanted to get my firewall working, and I used: sudo ufw enable after that my torrent client stopped seeding, my /ets/nginx folder disappeared and I actually don't even know what happened... so I ...
Cooller13's user avatar
3 votes
1 answer
5k views

Adding manual iptables rules to UFW

I have a use case that needs iptables' ability to restrict a rule to a group id (--gid-owner). Ufw doesn't have support for this in its rule syntax. From my experiments and reading online (e.g. UFW ...
Dave Pritchard's user avatar
2 votes
0 answers
3k views

How to enable IPTABLES tracing on ubuntu 18.04 server

Ive found this simple straightforward way to trace what Iptables is doing on my kubernetes/calico cluster https://www.opsist.com/blog/2015/08/11/how-do-i-see-what-iptables-is-doing.html Nor ipt_LOG, ...
Alexandre Hadjinlian Guerra's user avatar
1 vote
0 answers
81 views

Iptables forwarding all ports with certain destination ip address across network interfaces

I have a slightly complex question about iptables. So I have two network interfaces: ens5 eth0 I want to route all incoming traffic from eth0 that has an ip in the CIDR block (10.0.0.0/16) to ens5....
Marcus Dubreuil's user avatar
3 votes
1 answer
2k views

iptables owner module not found - match error "No chain/target/match by that name"

This is a fresh copy of ubuntu on my nVidia Jetson Nano, and I am trying to add the following rule to block network access for user 1001. sudo iptables -A OUTPUT ! -o lo -m owner --uid-owner 1001 -j ...
ste_kwr's user avatar
  • 11.3k
1 vote
1 answer
460 views

Make ufw follow iptable rules

I have a bunch of configuration in ufw that I want to avoid porting to iptables (unless there is a easy way to export from ufw and import in iptables). Simplicity of ufw etc. being the reason. Now I ...
NRJ's user avatar
  • 385
0 votes
1 answer
455 views

vpn has no internet after upgrading to 18.04

Resently,i upgrade my ubuntu 16.04 server to 18.04 but after upgrading ,my (Cisco anyconnect,pptp) vpn servers have no internet access... Can anyone help me?
ahooee's user avatar
  • 665
0 votes
1 answer
1k views

iptables rules applied multiple times

I had a very simple set of iptables rules on a newly installed system: $ sudo iptables -L Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- ...
callmebob's user avatar
  • 285
1 vote
0 answers
404 views

iptables rules randomly change - ubuntu 18.04

I have a simple set of iptables rules which start on boot a script in /etc/network/if-pre-up.d/: #!/bin/sh iptables-restore < /etc/iptables.rules exit 0 Similarly I have a script in /etc/network/...
callmebob's user avatar
  • 285
2 votes
0 answers
3k views

Wired Connection not working on 18.04(LTS). Please Help

$ ifconfig enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether 28:d2:44:44:0a:1c txqueuelen 1000 (Ethernet) RX packets 13959 bytes 1516430 (1.5 MB) RX errors 0 ...
Kanishk Saxena's user avatar
26 votes
5 answers
150k views

Iptables reload/restart on Ubuntu

I have problem with iptables on Ubuntu 18.04 before that I used to use with Centos 7 and Red Hat and I can simply restart with systemctl restart iptables but on Ubuntu it does not work. I could not ...
CsharpJoe's user avatar
  • 361
0 votes
1 answer
1k views

how to install ip_tables and ip6_tables modules in ubuntu 18.04 kernel 4.4.0?

I'm trying to upgrade from 16.04 to 18.04. I use FireHOL, but FireHOL can't install in 18.04 server, evidently because there are no ip_tables.ko or ip6_tables.ko kernel modules in /lib/modules/4.4.0-...
Steve Newcomb's user avatar
1 vote
0 answers
571 views

iptables rule that uses state

I tried the command conntrack -E and it returns nothing on Ubuntu 18.04. Someone told me that I have some iptables rule that uses state stuff. So I set iptables rule such as below: iptables -A ...
tnrgus's user avatar
  • 163
3 votes
1 answer
2k views

conntrack shows no result

I tried the command conntrack -L and it returns 0 flow entries have been shown on Ubuntu 18.04. And conntrack -E doesn't display nothing. I also tried to load the module by modprobe nf_conntrack_ipv4,...
tnrgus's user avatar
  • 163
2 votes
1 answer
2k views

How to allow DNS lookup with iptables on Ubuntu 18.04 server

I'm using Ubuntu 18.04 Server and trying to make a router. When I execute the following iptables script (which worked just perfectly on Ubuntu 16.04), the DNS lookup from command line stops working. I ...
Todor Andreev's user avatar
1 vote
1 answer
3k views

fwmark routing policy with netplan

I'm migrating a legacy Debian setup to a new Ubuntu setup. I have previously set, in /etc/network/interfaces: post-up /sbin/ip rule add fwmark 1 table table.tunnel pre-down /sbin/ip rule del fwmark 1 ...
Borg's user avatar
  • 13