Questions tagged [iptables]

Iptables is a module that provides the Linux operating system functions of firewall, NAT and logging of data traveling over a computer network.

Filter by
Sorted by
Tagged with
0 votes
1 answer
922 views

ip6tables conntrack module does not work

I'm trying to setup my device such that only it may initiate network connections other hosts. I.e, other hosts should not be able to initiate a connection with the device. I've got ipv4 working: ...
Sush's user avatar
  • 101
1 vote
1 answer
169 views

IPtables not forwarding user error

So I am trying to forward traffic from the internal port 514 to the internal port 55514 over udp (running Ubuntu 19, syslog coming in on 514 from firewall, logstash listening on 55514) It's not ...
johnbchron's user avatar
3 votes
3 answers
1k views

I Have No IPTables

I have something really weird going on that I can't seem to find any reference to after a lot of googling. I seem to have no iptables. Not that the chains are flushed or that they are all ACCEPT rules ...
Max Ehrlich's user avatar
1 vote
1 answer
412 views

Why does port redirection via IPtables for a second DNS resolver on the same server not work?

I have a Raspberry Pi that is running Bind9 as an authoritative DNS server for a local zone. Every other DNS requests are forwarded to a public DNS server. So Bind9 is listening on port 53 at address ...
idlmn89's user avatar
  • 213
2 votes
1 answer
2k views

Could I set up ufw to only allow access from the specified ip addresses?

For really high security, how can I add ip addresses of the websites that I want to visit individually? What command should I use? How could I get ip addresses of the websites without being able to ...
Linux_user0987's user avatar
2 votes
1 answer
1k views

Load balancing with IPtables

I'm running 2 nginx docker containers on the same EC2 instance in AWS. The containers are using the container port 80. The first container has an IP address 172.17.0.2 and is mapped to port 81 of the ...
Rohan Dsouza's user avatar
0 votes
1 answer
2k views

Host port not being forwarded to docker container by docker and/or docker-compose

Other titles might be: Docker doesn't set up port forwarding now. After flushing the iptables and reinstalling Docker I have lost port forwarding. I am having trouble accessing my Docker container ...
mhsquire83's user avatar
0 votes
1 answer
259 views

iptables error while building docker image on raspberry pi (linux/ARM)

I have docker and docker-compose installed on my raspberry pi. While trying to build the following a docker-compose.yml I receive the an ip tables error during the building of a (linux/arm ported) ...
Ryan Lingle's user avatar
2 votes
0 answers
1k views

How does tc work with iptables?

The common way of traffic shaping is creating a classful qdisc on a network card and create a class and filter under the root qdisc. Then use iptables to set marks on the packets. But since iptables ...
William's user avatar
  • 581
0 votes
1 answer
121 views

Using iptables for setting an IP destination for a specific IP source

Situation: I've already created different IP aliases, (each with a different virtual Mac Address too). ip link add link eth0 address 00:11:11:11:11:11 eth0.1 type macvlan ifconfig eth0.1 172.17.1....
fqlenos's user avatar
  • 23
0 votes
0 answers
105 views

iptables rule to nat inbound only ports

This would be a very long post if I had to explain all the reasons behind this I have to have an application listening on port 8080 This application also needs to listen on port 8181 -- but the ...
Rich's user avatar
  • 1
0 votes
1 answer
1k views

Routing & IP Tables for multiple OpenVPN tunnels

I have a web server which serves a site on port 3000. This web server is accessible on my local network (https://172.16.1.16:3000) but I need it to be accessible from the internet via multiple URLs. ...
A. Gibson's user avatar
0 votes
1 answer
5k views

Redirect DNS Via iptables

Background I've been stuggling to get a redirection working via iptables - a combination of restrictive capabilities of the s/w versions on DD-WRT and (more likely) my shoddy script. We have a very ...
Steve's user avatar
  • 91
0 votes
1 answer
1k views

Port forwarding with iptables

I'm hoping someone would be able to help me. I have recently got Raspberry Pi 3 and now I'm trying to set up port forwarding. Raspberry Pi is connected to my home network via Wi-Fi (wlan0) interface. ...
xelibrion's user avatar
  • 101
0 votes
1 answer
30 views

Home PC with VPN connection i cannot login from Work PC?

I have a Ubuntu PC home running, with a dynamic IP address. Now I have rented a VPN service. zorrovpn.com When my PC starts up, then immediately VPN connection goes via zorrovpn.com /etc/openvpn/...
Hendrik's user avatar
1 vote
0 answers
2k views

No Internet connection inside Docker container (not NAT / DNS issue)

Good morning, As said in the title, I have problem with Docker : there is no internet connection for my Laravel App inside Docker. It is not a DNS or NAT masquerading issue, I've already checked ...
Manoa's user avatar
  • 11
0 votes
2 answers
665 views

How to secure SSH and VNC on my VPS with iptables?

I have rented this small VPS and i keep get trying to get hacked by brute force attacks. So i want to restrict SSH and VNC to two IP addresses that i have (on separate networks) I tried to do this ...
fjleon's user avatar
  • 129
0 votes
2 answers
568 views

output of 'iptables -L -nv' commands meaning

root@linux #iptables -L -nv The output looks like this Chain INPUT (policy ACCEPT 89658 packets, 116M bytes) pkts bytes target prot opt in out source destination ...
Zombo Zi's user avatar
0 votes
0 answers
211 views

Iptables configuration

Here is my iptables script. Can it be better ? Thanks in advance ! #!/bin/bash #iptables-restore < /etc/iptables.test.rules iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables ...
redraven's user avatar
0 votes
1 answer
381 views

How to route copied packets to second interface?

I have two AWS instances running CentOS 7, A and B, and I need to send all copied packets from A to a second interface on B (eth1). I have set up IPTables to copy and send packets: iptables -t mangle ...
neoinageo's user avatar
1 vote
1 answer
238 views

Configure iptables firewall to forward traffic

I have 3 Raspberry, of which one to use as a firewall with iptables, connected to others via switch. Internet--> A (firewall) --> (switch) --> B \-> ...
Giupo's user avatar
  • 13
2 votes
1 answer
7k views

Block outgoing DNS via iptables on a linux router

I have a small network with a linux router running Debian 9, I'm having some difficulty with preventing the devices inside the network from querying external DNS services. I would like to REJECT ...
c_clerk's user avatar
  • 23
0 votes
0 answers
1k views

How to load iptables rules.v4 file

I've been trying to initiate a rules.v4 file that I have written a handful of rules into, but I can't seem to get the rules to load with sudo iptables-restore < /file/path/rules.v4 I have saved ...
upgrayyed's user avatar
0 votes
1 answer
180 views

Workaround for firewall that is blocking unsolicited traffic

I have AT&T wireless at my house for home internet. Where I am located it is rural and don't have many option's for ISP's. My goal is to be able to SSH back to my house and possibly view my ...
Jonathan Philpot's user avatar
1 vote
0 answers
29 views

iptables - redirects to local network causes connectivity issues

I have 2 Debian routers and network set up like this: | | | Internet/Public IP | ---------- ROUTER A ---------- | | 10.97.0.1/16 | | 10.97.64.1/16 ...
user1022059's user avatar
0 votes
0 answers
276 views

Redirect all wlan0 request to webserver

Usecase: Whenever any wireless device will get connect to access point, it will send DHCP request. Access Point will forward DHCP request to Fortinet DHCP server and block all other request for that ...
Dhruv Patel's user avatar
0 votes
1 answer
234 views

Node-RED on Debian 9 server cannot connect to MQTT brokers

My Node-RED flow: [{"id":"6c5780e.7e86f","type":"mqtt in","z":"fa8ef0ce.69a348","name":"","topic":"bs/esp8266/ldr","qos":"2","datatype":"auto","broker":"11952de3.32d7b2","x":320,"y":420,"wires":[["...
Biel's user avatar
  • 103
0 votes
1 answer
2k views

how to configure nfs and iptables

I'm trying to setup NFS sharing + iptables, so that I can actually access it. I'm failing to find any up-to-date/working documentation/articles. Can you explain or share link to proper documentation? ...
Martin Mucha's user avatar
0 votes
0 answers
115 views

Brige a internet connection fron one computer over a serialport to another computer

I have two computers, one connected to the internet via ethernet, and another one that I would like to get a network connection to by serial link from the first computer. Basically letting the first ...
monkcs's user avatar
  • 1
0 votes
1 answer
107 views

iptables ignored? Ubuntu SSH Break in Attempts besides Firewall Rules

I noticed that a btmp file appeared in my home directory. It seems that there were automated break-in attempts on my server. However, my server has firewall rules (iptables) in place that should ...
user9114945's user avatar
0 votes
0 answers
206 views

How to set gateway address in /30 network?

i have /22 network and need /30 network for my virtual machine. My 22 network is 192.168.20.0/22 and 30 is the same. Can i get different from 192.168.20.2 address for server. How could i setup ...
Vladimir's user avatar
  • 101
1 vote
1 answer
2k views

Routing between bridge network and host interface?

I am trying to set up a docker host server in my network (Ubuntu 18.04), and I'm struggling with wiring up the network. Ideally, I'd like to set it up such that I can route traffic to a specific IP ...
user1456632's user avatar
1 vote
1 answer
4k views

Hetzner reported not allowed MAC addresses in subnet

We had email from Hetzner network team asking us not to use MAC addresses belonging to the Virtual Machines belonging to the subnet. We configured Xen server host as a router using this guide. After ...
Alex's user avatar
  • 11
1 vote
1 answer
187 views

What's wrong with this outbound iptables firewall?

I have a mail server which I'd like to secure by only allowing OUTBOUND connections on the various ports it uses. The inbound rules are working fine - they are handled by the VM host. I've not been ...
TommyPeanuts's user avatar
1 vote
1 answer
1k views

Why SNAT works by setting one rules in tables without the rules in PREROUTING chain?

I have some questions about SNAT with iptables. Assume there is one router who plays DHCP server for assign private IPs in my LAN and NAT for the hosts in my LAN can access the public internet. The ...
Haohao Chang's user avatar
1 vote
1 answer
968 views

iptables internal traffic redirection

I want to redirect all http/s traffic belonging to user 'cromy' to internal proxy: iptables -t nat -A POSTROUTING -d 127.0.0.1 -p tcp -m multiport -m owner --uid-owner cromy --sports 80,443 -j ...
achille's user avatar
  • 137
0 votes
1 answer
1k views

Properly configure fail2ban for ssh server in docker container

I have a configuration based fail2ban. I am running a container that runs an SSH service, and I am seeing a lot of "strange" connections. I have set docker to send the log of the container to Systemd'...
chronos's user avatar
  • 135
0 votes
0 answers
33 views

Turning off network during Incoming DDOS

Sometimes on a server of mine, there is unsolicited incoming traffic (mix of random ports & random protocols beyond tcp/udp/icmp also) which starts peaking at 1 to 2 GBit/s while the outgoing ...
Sam's user avatar
  • 143
3 votes
1 answer
4k views

Time-limited whitelisting of IP address(es) with ipset and iptables

I found a question from another post that is close answering what I'm seeking. In short, I want to be able to setup a rule via ipset that times out automatically, but I want to whitelist specific IPs ...
Cloud's user avatar
  • 551
0 votes
1 answer
410 views

Forward internet from eth0 to a repeater connected via eth1 and serve a captive portal

Premise: a ranch/guesthouse in northern New Mexico wants to show their guests a splash page before allowing them on to an otherwise open network. Currently, the internet comes through a modem and ...
alphanumeric0101's user avatar
0 votes
3 answers
2k views

Don't allow users to SSH to other systems

I know how to restrict SSH access to a system. How can I restrict SSH access to ANOTHER system when a user has logged in to my system. For example: # ssh joe@myserver # joe@myserver $ /home/joe # joe@...
Ken J's user avatar
  • 111
1 vote
1 answer
2k views

IPTABLES - configuring SNAT with dynamic to-source

My development environment uses a docker swarm node with multiples microservices inside. I need make the microservices running in my machine communicate with the microservices running inside docker, ...
brevleq's user avatar
  • 111
0 votes
1 answer
182 views

measuring network bandwidth during scan with iptables

How do I account for the traffic using iptables? E.g. How can I follow how many resources scanning a single host require, in terms of network bandwidth ?
user avatar
2 votes
2 answers
28k views

iptables on Windows10

I'm looking for a way to get iptables functionality in windows 10. I enabled IP routing and I need to forward tcp data to another host (port 4000) and then forward his response while masquerading IP. ...
Marcos Tomassi's user avatar
0 votes
0 answers
807 views

iptables Multicast Traffic Dropped on WAN

For my home router, I am running a small Debian box which connects to my ISP via a separate modem using PPPoE. I have had some iptables rules in place for quite a while which: Allow all traffic on ...
jren207's user avatar
  • 21
0 votes
1 answer
152 views

Understanding iptables ICMP log

I am studing IPTABLES and yesterday I was visiting a company and to connect to their network I had to turn of my firewall. It was assigned the local IP to my wireless interface. I got this logs a few ...
user8012's user avatar
  • 103
1 vote
0 answers
80 views

Installing ufw on Debian Stretch

I am thinking of installing ufw on my Raspberry Pi that is running Debian Stretch because I am no expert in firewalls and I think it would make my life easier. My understanding is that ufw is just a ...
NormB's user avatar
  • 11
0 votes
2 answers
245 views

Route so that AWS instance appears on internal network and vice-versa

I have an AWS Lightsail instance to which I'd like route all traffic from my network directed to a specific (i.e.: 192.168.1.225) IP address and from which I'd like to route all traffic directed to ...
simone's user avatar
  • 181
3 votes
1 answer
578 views

Linux not preferring ipv6 on dhcpv6 network

On my home network, I'm using a (Raspbian) Raspberry Pi as a wifi router with hostapd, isc-dhcp-server, radvd, pihole, and dnscrypt-proxy installed. I do not use dhcpcd, I use dhclient. As I only get ...
vw5E4opn's user avatar
4 votes
1 answer
20k views

iptables reject-with icmp-host-prohibited

I recently bough new KVM/VPS once I install OpenResty(nginx fork) and run it , my server were not accepting incoming connection on the test port 8080 I manage to solve the issue by adding port 8080 to ...
Salem F's user avatar
  • 336

1
11 12
13
14 15
39