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

learn more… | top users | synonyms

1
vote
1answer
248 views

“iptables -P OUTPUT DROP” blocks DDWRT's web interface

When I do iptables -P OUTPUT DROP it blocks DDWRT's web interface. That is I am not able to access http://192.168.1.1 via Firefox. I put this rules before changing the chain policy to drop: ...
0
votes
0answers
15 views

Unable to install iptables [HELP]

Hello so I removed iptables for reasons I don't even know but when reinstalling i get this error Reading package lists... Done Building dependency tree Reading state information... Done Package ...
0
votes
0answers
95 views

Linux ip route / ip rule with fwmark and iptables -j MARK --set-mark

I just need to re-roure all user traffic directly to specified GW (different from the default one) bypass all VPN and other routing rules. Lets start it from scratch (reboot the system), no interface ...
1
vote
0answers
256 views

502 bad gateway after putting up firewall nginx

My server was working, then I added a firewall for a bunch of ports! And now I get the error: 502 Bad Gateway nginx/1.4.6 (Ubuntu) Nginx server { listen 80; server_name 45.79.80.140; #...
0
votes
0answers
7 views

iptables forward combined with bfifo doesnt work

I have 3 interfaces, 2 internal(wlan0,wlan01 )and 1 external (eth1) and i want to configure traffic from eth1 ,so i use iptables to send all outgoing traffic from the internal interfaces to eth1: So I ...
0
votes
0answers
26 views

How to use a local SOCKS server as a gateway?

I'm running a SOCKS proxy server (on an Ubuntu machine) which is used to bypass internet censorship. I'd like the devices in the same network (such as TVs etc), which don't support SOCKS, to use this ...
0
votes
0answers
49 views

write a raw packet to tun/tap

I am a newbie to the tun/tap and iptables. I am confused about some questions about the tun these days. Firstly, I create a tun interface named tun0 and set its ip address to 192.168.128.2/24. If I ...
0
votes
0answers
20 views

set tun interface to visit the internet

I have a tun interface named tun0(10.0.1.1),and a physical interface named eth1(10.110.136.76) on my computer. I want to use the tun0 to visit the internet. Firstly, I create and set the tun like ...
0
votes
1answer
14 views

Allow http request over specific port in iptables

I'm running Kodi with a web service for the remote control. The web server is listening to port 11734, however opening that port (UDP and TCP) doesn't seem to work. Once I accept all incoming traffic ...
1
vote
0answers
35 views

assign IP to tinyproxy on OpenWrt

I have installed tinyproxy on OpenWrt and now I want to make rules for iptables that match traffic from tinyproxy. I want to mark this traffic with set-mark and route it to different routing table. My ...
0
votes
1answer
163 views

Cannot restart apache on Centos 7

I cannot restart HTTPD on Centos 7. When I try to run the command it shows this error below. How can I overcome this? -- -- Unit session-735.scope has begun starting up. Apr 12 15:33:01 localhost....
0
votes
1answer
43 views

iptables rule doesn't work for port 80

My VM has set some rules for access to a web server and a SSH. The server is running in the internal port 8080 en redirected using iptables to the port 80 with the command: iptables -t nat -A ...
0
votes
0answers
21 views

how many rules iptables or single chain support

I have multiple user (approx 800 users), I am developing IPTABLES firewall for MAC address based filtering. My Question is HOW MANY RULES CAN I ADD IN A SINGLE CHAIN AND HOW MANY RULES CAN HANDLE ...
0
votes
0answers
48 views

Automatically apply routes with /etc/network/interfaces

I have a usb-ethernet adapter. When it comes up, I am applying routes and rules to get the network working the way I want. I'm trying to add post-up directives to /etc/network/interfaces to apply the ...
0
votes
1answer
26 views

ipset -j SET --add-set notwroking in cetos

I recently installed ipset rpm and kmod-ipset rpm for my Centos (Linux 2.6.18-194.11.3.el5 i686) and try to hands with help of some examples from internet, but when I try to ban user who tries to ...
1
vote
0answers
39 views

Iptables WiFi , blocking

I would like to block all Wi-Fi devices except one. I have two Wi-Fi routers and I am only allowing one in my IPTABLES rules to connect; but I am able to still connect to both. iptables -P INPUT ...
0
votes
0answers
48 views

fail2ban does not ban IP although there is one failed regex in table

I don't know why fail2ban not adding the bad ip into iptables rules. Here is my setup. /etc/fail2ban/filter.d/http-get-dos.conf [Definition] failregex = ^<HOST> -.*\"(GET|POST).* ignoreregex = ...
4
votes
2answers
10k views

Using iptables to redirect ip address

I have the requirement on a Linux system where the Linux device is using RSYNC to sync data to another Linux machine. This is working fine at the moment, however I need to move one of the machines to ...
1
vote
0answers
167 views

Block Windows 10 P2P updates with a corporate firewall

I work for a small IT company that fix mostly Windows computers, and lately we have an huge issue with Windows 10 updates. When a new computer enters our network and starts downloading updates, it ...
0
votes
1answer
82 views

Connected to hostapd hotspot but no Internet

I'm setting up a Gentoo Linux home router with following configuration: eth0: connected to WAN (managed by systemd-networkd) wlan0: access point for LAN (managed by hostapd) I use dnsmasq as DNS ...
1
vote
0answers
37 views

Block all inbound traffic except one IP using windows firewall rules

I have no problem doing this in linux. I just write an iptable to block all traffic and another one after to allow a specific IP. However it doesn't look to be that easy on Windows. I did the exact ...
0
votes
1answer
29 views

block most traffic on an expensive link

I'm running with two wan links. The new one is expensive, and I only want to use it for ssh. The new link is on eth1, 192.168.8.1. I am attempting to use ip tables to block all incoming and out ...
0
votes
1answer
133 views

Redirect secondary network interface traffic along with port forwarding to tun0 (OpenVPN) using iptables

I have a NAS server which I should do port forwarding for it in order to make its services accessible from internet. However my ISP is blocking ports, so I've managed to buy myself a cheap Ubuntu VPS ...
1
vote
1answer
29 views

SSH password login: iptables Log/Drops listsDST=18.9.2.13/18.7.33.13

Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User. ...
1
vote
1answer
221 views

Configuring CentOS 6.7 as a Squid proxy server: How may I solve this issue?

I'm using a PC running on CentOS 6.7 with 2 NIC's (eth0 & eth1) as a Squid Proxy server. eth0 (Red interface/ 192.168.0.2/24) is connected physically with the router (192.168.0.1/24) while the ...
0
votes
0answers
43 views

Linux routing traffic from wlan0 to localhost:port

I'm behind TGM proxy , connected via LAN on eth0 which goes to my laptop. Creating socks proxy tunneled with ssh via cntlm can bypass the proxy which is fine for my laptop. But I struggle to create a ...
0
votes
0answers
1k views

Sharing wlan0 internet to eth0

I would like to share my wireless Internet connection through a Raspberry Pi as follows: Raspberry Pi Internet --- (wlan0 --- eth0) --- Computer I have managed to setup the wireless ...
6
votes
2answers
12k views

Iptables redirect to localhost?

Suppose I have a network with a server routing all connections from inside the network to the Internet. How can I set up iptables so that instead of routing incoming connections to the Internet, it ...
0
votes
0answers
33 views

iptables: plugging a VPN leak

I have a small personal VPN based on OpenVPN in bridge mode. The main purpose is to allow communication between machines, but as an added bonus, I can let mobile devices tunnel their traffic through ...
1
vote
1answer
64 views

iptables: How to allow SSH through debian router?

This is the network map: [External computer]---[Router]---[SSH server] EXTERNAL NET <=|=> INTERNAL NET Router is doing SNAT and port translation: #~ iptables -t nat -A ...
-1
votes
1answer
37 views

How to configure iptables to route specific services tos pecific worstations?

May not be the best question title. I'll try to explain better. Also, I'm no firewalling expert. I have a linux box/router based on debian (it's a dreamplug in case it makes a difference). The ...
0
votes
1answer
67 views

IPtables GeoIP libxtables

I was about to install geoip module for iptables. Installation goes fine until I checked the module. It says: iptables: match "geoip" has version "libxtables.so.10", but "libxtables.so.11" is ...
0
votes
0answers
22 views

Creating a Guest WiFi interface on Banana Pi, where devices on other interfaces can't reach each other

I have a Banana Pi I'm trying to use for a Guest WiFi network; What I'm trying to achieve: Pi forwards traffic eth0<->wlan0 Desktop can't contact Guest1, and the other way around. Guest1 can't ...
0
votes
1answer
22 views

Using iptables, set up NAT for a specific range on a local bridge

I'm trying to get a NAT setup for a specific range of IP addresses. I run a QEMU/KVM hypervisor with a local bridge that has ip range 10.0.0.0/8. On that bridge, I have several IP ranges for different ...
0
votes
2answers
26 views

Redirect web traffic to local server

I saw this pair of commands: iptables -t nat -A POSTROUTING -j MASQUERADE iptables -t nat -A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.42.1:3128 iptables -t nat -A ...
3
votes
2answers
5k views

unable to connect to localhost:80 after installing nginx

I just installed nginx by doing sudo yum install nginx and I'm unable to connect to it on port 80. I tried stopping iptables by doing sudo service iptables start and was still unable to connect. I'm ...
2
votes
2answers
154 views

Forward HTTP access to another IP address in iptables

Hi I am using my local internet provider whenever I visit any page and when I look at a source code of the page there is a script injected into code http://10.80.196.101:8080/www/default/base....
0
votes
0answers
35 views

Configure iptables to keep source address on port forwarding

I want to set up a simple NAT port forwarding rule: external host <-> router <-> server When the external hosts connect to the router's public IP on the forwarded TCP port, a connection ...
0
votes
0answers
22 views

dnsmasq not picking up requests

I recently bought a new smart TV and I'm trying to proxy all requests from it through my laptop. My setup is this: [TV] -> ethernet cable -> (enp0s25)laptop -> router -> internet My TV is connected ...
0
votes
0answers
25 views

Linux: Guarantees by traffic shaping using tc

I am using tc and iptables to limit the bandwidth of port 5000. However, I notice that even though the bandwidth reduced, it is highly variable. What are the guarantees of traffic shaping and ...
0
votes
0answers
16 views

UDP Forwarding redirection keeping source info in Linux

I would like to do an UDP Forwarding redirection of traffic in machine B, so UDP traffic from machine A would go to machine C. I have used iptables and that goes fine. The problem I have is that I'm ...
0
votes
0answers
39 views

How to direct traffic based on destination PORT to different interfaces in Linux?

I want to send http[s] i.e. destination port 80,443 traffic through interface1 and rest all traffic through interface2 (which are two different ISPs) and should receive the packets as well. The issue ...
0
votes
0answers
112 views

LINUX: Limiting bandwidth of a set of ports

I want to limit the bandwidth (send and receive) of a set of ports. Upon reading few resources online (Link1, Link2), I realized that I need to use tc and iptables to do this. So I am using the ...
1
vote
2answers
65 views

Forward IP of IP camera from eth0 to wlan0, on the same linux machine

I have a linux machine with 2 network connections, wlan0 and eth0. Through wlan0, the linux machine is connected to the router, and through eth0, the linux machine is connected to the IP camera (via a ...
0
votes
1answer
81 views

How to manage my firewall with new Centos's utilities?

I just installed a Centos7 distribution on my server. I came from Centos6, and I read that iptables utility has been replaced by firewalld and services utility by systemctl. So I try to get my ...
0
votes
0answers
23 views

How can I duplicate traffic with iptables v1.3.5?

I want to duplicate all traffic and send it to my computer over cable to see what is my computer sending over wifi (it probably sends corrupted packets, because sometimes it jams all computers ...
1
vote
0answers
2k views

udp client sending ICMP “port unreachable” when receiveing messages from the server

(Note: I moved this question from StackOverflow, because it's to be considered off-topic there, better fits here, and still unsolved) I have a udp client using luasocket, basically doing this (with a ...
0
votes
0answers
33 views

How should I configure my Linux kernel (running on armhf architecture) if I want to use the NAT-table in iptables?

I successfully compiled a Linux kernel (version 4.4) with nat support for my desktop computer that runs on a x86-processor. Now I want to do the same for my server which has an ARMHF processor. The ...
0
votes
2answers
717 views

UFW default rules… where are they?

In the tutorial on UFW here https://help.ubuntu.com/community/UFW it says that UFW uses the default rules if enabled and not configured. I checked the folder: /etc/ufw/ and the files I found ...
1
vote
1answer
51 views

Layer-2-Accessible DMZ: ebtables?

I'd like to make a network topology where all the IoT devices (printer, DVR, thermostat, BluRay player, etc) are all in a DMZ and the rest of my devices are all on the LAN. Note that the usage of DMZ ...