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

Questions tagged [iptables]

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

0
votes
1answer
18 views

iptables setup for routing

I want to setup my ubuntu computer to route packets. Therefore I've read several tutorials which always had many rules to add to iptables. I finally found out, that the only rule needed (given that ...
0
votes
1answer
26 views

iptables prevents me from connecting

I'm using Ubuntu 18.04 and my current iptables rules are from this question; iptables -L gives: Chain INPUT (policy DROP) target prot opt source destination ACCEPT all ...
1
vote
1answer
26 views

How can I clear the PREROUTING rules in my iptables?

Long ago I created some prerouting rules in my iptables. I have a script in ~/myuser/Downlaods, owned by root #!/bin/bash iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-...
0
votes
0answers
18 views

iptables issue | eth0 unknown host [duplicate]

I have a BananaPi M2+ device loaded with Ubuntu Mate OS. I am trying to make a router out of it, which can connect via eth0 or wlan0 interface and prove Access Point via wlan1 interface. I found this ...
0
votes
0answers
19 views

ip_forward without source route

Security aside (lets assume I don't care about security and I know what kind of danger I am putting myself in), I cannot get net.ipv4_ip_forward to work for me in one particular case: I have a packet ...
0
votes
0answers
19 views

Setting up Ubuntu as a router using iptables

I'm trying to set up an Ubuntu VM (using Virtual Box) as a router to connect LAN to DMZ and let the LAN surf the net. First of all lets have a look at this (can't post images due to reputation :/): i(...
1
vote
2answers
91 views

How to Limit Connections to 1 connect on 5 seconds? (IPTABLES)

I lead server in game, which have broken AntyCheat and if there are many connects in one time it break whole server and no one can connect. So the solution for it is limit connections in one time to 1 ...
0
votes
1answer
26 views

Problem opening ports on Ubuntu 16.04

I am trying to open several ports on my computer running Ubuntu 16.04, which would allow me to run drone simulation software on it and connect to it a companion computer (Odroid). I have tried ...
0
votes
0answers
22 views

Allow localhost connections with VPN

Note: Cross-posting from Unix & Linux since the question got no replies there. I have some services running as web servers on my PC (e.g., Jupyter Notebook), which stop working when I connect to ...
0
votes
1answer
36 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?
1
vote
0answers
35 views

How can I improve this iptables

As a training, I'm trying to install a server with ESXi, On this ESXi, I have a first ubuntu 16.04 VM that will be the firewall between WAN and LAN. So the host machine IP is 192.168.1.25 and the ...
0
votes
0answers
36 views

SSH connection time out?

I'm using Ubuntu 16.04 and I'm trying to access via ssh from any computer. I've already altered the iptable configurations to accept all traffic from any IP, but I still got "the connection timed out" ...
-1
votes
0answers
60 views

Ubuntu routing between two interfaces has very low speed

I'm routing traffic from enp5s4f0 (private) to enp7s4f0 (internet) this is my interfaces file: internet interface auto enp7s4f0 iface enp7s4f0 inet static address 10.192.129.164 netmask 255.255....
12
votes
1answer
2k views

UFW: what exactly is it?

What is UFW? You would think this is an easy question, but the more sources I read, the less clear it gets. The acronym spells out to Uncomplicated FireWall, as though ufw actually implements a ...
0
votes
0answers
25 views

vpn and internal network routing questions

Picture of network layout above. Am able to get internet access on all machines. VPN is working ok. My issue is, i would like to be able to get access back to "End Machine" from the Public IP ...
0
votes
1answer
28 views

iptables: No chain/target/match by that name

root@OpenWrt:/man/ipk# iptables -I FORWARD -m string --algo bm --string "instagram" -j DROP iptables: No chain/target/match by that name. root@OpenWrt:/man/ipk# Can anyone suggest why this isn't ...
1
vote
0answers
105 views

Can't telnet from my Ubuntu server 18.04.1 to specific routers using the telnet port (23)

I don't want to go far in to details, because I know you should not use telnet but ssh instead, however in my situation I need to use telnet. Basically, I have a Ubuntu server 18.04.1 and I have a ...
0
votes
0answers
16 views

Iptables - security setting

I going to use a Ubuntu laptop on a public WiFi network, probably with full of hackers. What iptables rules would you recommend? I don't mind blocking NTP port 123 for security. I just use my ...
0
votes
1answer
32 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 -- ...
1
vote
1answer
14 views

Routing between 2 wired interfaces without using NAT features

I have two internal networks (I do not want/have Internet access) where I connect my Ubuntu 14.04 (with eth0 and eth1 network interfaces). From eth0 (network 192.168.0.0) I connect another PC1 ...
0
votes
0answers
65 views

How to open port 22 with iptables

I am not able to ssh into an ec2-instance. when I run nmap -Pn 10.xxx.xxx.xx I see that instance doesn't have port 22 open I have a security group added to this instance that has a ssh rule added. I ...
0
votes
0answers
14 views

Proxy setup between a private and public

I have two servers: Private Server with IP: 172.16.0.2 Public Server with 172.16.0.3 (private IP) and x.x.x.x (public IP) What I want to achieve is: Incoming communications to Public IP (x.x.x.x) ...
1
vote
0answers
59 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/...
0
votes
0answers
33 views

How to restrict access from internet to containers ports on remote linux server?

I use docker-compose on ubuntu 18 on remote server. How, with iptables, can i block access from the internet to the docker port and only allow access to it from the localhost of this server? For ...
0
votes
0answers
32 views

Why have commands ip6tables, iptables or ufw no effect?

I want to block a certain ipv6-address and this is somehow rejected (by object?)? Command is: sudo ip6tables --policy INPUT fe80::da58:d7ff:fe00:8d0c -j DROP ... and this has no effect. Is this ...
0
votes
1answer
31 views

Where is to edit the firewall-rules for iptables and ip6tables correctly?

I want to set myself up the rules for firewall in iptables. But several queries have delivered different file-locations for iptables-rules. One location is in /usr/local/bin and there is to create ...
0
votes
0answers
23 views

VSFTPD No route to host

I've installed and configured vsftpd following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-for-a-user-s-directory-on-ubuntu-16-04 but when I try to connect to ...
0
votes
0answers
53 views

Virtual NICs on Ubuntu 18.04

We are a group of students completing a development project unit at the University of Sydney. We have had difficulty with Linux routing, and would really appreciate being pointed in the right ...
0
votes
0answers
41 views

16.04 server ufw enabled but port open

UFW was not enabled after startup I have tried everything, and eventually put it in rc.local ufw enable, and now it's enabled after reboot. This is output of uwf status: ufw status Status: active ...
2
votes
0answers
211 views

How do you make an Ethernet network interface silent on layer 2 and above?

I would like to be able to make a single Ethernet interface on Ubuntu 18.04 silent and receive only. No traffic out at layer 2 or above, no responses to traffic inbound. I have initially tried the ...
0
votes
0answers
24 views

up script in ovpn configuration file for Open VPN gives fatal error: could not execute external program

My openvpn finishes with the following: Sun Sep 30 01:35:11 2018 masquerade.sh tun0 1500 1552 192.168.255.6 192.168.255.5 init Sun Sep 30 01:35:11 2018 WARNING: Failed running command (--up/--down): ...
0
votes
3answers
114 views

Run a Bash script to set up iptables at startup [duplicate]

I'm using Ubuntu 16.04 Server. I want to use a Bash script for iptables at startup, but I dont wanna use crontab or init.d. Is there any possible way to achieve this without them? #!/bin/bash IPT="/...
0
votes
1answer
37 views

Redirect - IPtables

I'm going to be redirected to page 192.168.1.1 When the user enters the www.google.com site. So I run the following commands on the router : iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --...
0
votes
0answers
21 views

Can UFW drop existing connections?

With iptables I can create deny rules that will drop existing connections. I can't find a way to do this with UFW, is it possible? It seems to only block the creation of new connections. n.b. I see ...
0
votes
0answers
153 views

iptables is not reloading after rebooting

iptables was not reloaded after rebooting the Ubuntu server (Ubuntu 18.04.1 LTS). I added this line sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080 to iptables. ...
0
votes
0answers
26 views

How to ping an one ip address and be routed to another one

I need some routing in my machine. For example, I ping ip address 172.16.x.x and want it to be addressed to 10.246.x.x on my local machine How can I do that?
0
votes
1answer
48 views

Why does Ubuntu 16 forwarding not work?

I try to implement the very simple Ubuntu forwarding from one IP to another. I don't care about security on that stage (it runs in sandbox now), I just need it to work. I set FORWARD policy to ACCEPT ...
0
votes
1answer
356 views

Squid Proxy - The requested URL could not be retrieved

I'm trying to redirect all of my subnet traffic to a squid proxy using iptables on the router gateway (the squid proxy is located in the LAN). The redirection works (cache & access file respond ...
0
votes
1answer
24 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 ...
0
votes
1answer
88 views

Limit max number of connections coming from a specific IP address

I want to limit the number of connections of a specific IP (147.0.0.0 for example) to 25 concurrent connections for the port 5566. I am currently able to limit the max concurrent connections of the ...
0
votes
0answers
32 views

Port forwarding between three PC's

Architecture: configuration: PC 1 eth0(a) - 172.xxx.xx.xxx PC 2 br0(b) - 172.xxx.xx.xx PC 2 br1(e) - 192.xxx.xx.xx PC 2 container eth0(c) - 172.xxx.xx.xx PC 2 container eth1(d) - 192.xxx.xx....
0
votes
1answer
73 views

package forward low performance and low forward speed in using Ubuntu as router

I have built a router based on Ubuntu Desktop 18.04.1(kernel: 4.15.0-32-generic x86_64). I followed this guide https://killtacknine.com/building-an-ubuntu-16-04-router-part-1-network-interfaces/ . ...
0
votes
1answer
49 views

how to know which iptable is matching?

I am new to working with iptables, I have created several rules and I need to know which of them is blocking my traffic, in other words, I need to know which of them is matching
1
vote
0answers
44 views

Help creating a Network Namespace to run a VPN

My intention is to setup a Network Namespace which will have a VPN running in it. I plan on having certain applications configured to start in that Namespace to be behind the VPN. Anything not ...
0
votes
2answers
241 views

KVM NAT Port-Forwarding

i have Ubuntu 18.04 with KVM and a Debian VM. The Debian VM should accept the port 8834 from outside. Can anyone explain me how it should works? Thanks
0
votes
0answers
41 views

change of source address and response

I have a VPS server where I have a service running on a udp port, for example 20000. Server has an external address x.x.x.x, has one eth0 network interface and a local 'lo'. I would like to get that ...
0
votes
1answer
27 views

Ubuntu 16.04 - Wi-fi , IP is on a network different than my gateway

I have a partitioned Lenovo pc. One partition with Ubuntu desktop 16.04, one with Windows 10. Windows has internet connection, Ubuntu does not. It is on a different network. I tried gathering some ...
1
vote
1answer
509 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 ...
0
votes
0answers
176 views

Connection refused on port 7777 Ubuntu 16.04

I've got an app listening for port 7777, and when I run sudo netstat -tnlp | grep :7777 I can see that the relevant port is being listened for... tcp 0 0 127.0.0.1:7777 0.0.0.0:* ...
0
votes
1answer
719 views

iptables/ufw: Block specific host access to internet based on time

I'm running Unbuntu 18.04 as my router/server, which passes traffic over to the internet via interface enp5s0. On my internal interface (enp4s0) I have devices that I wish to restrict from the ...