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

0
votes
1answer
5 views

Linux gateway using double data on AT&T, is my iptables wrong?

I have cellular internet connection with AT&T. Everyone connects to the wifi access point that I have my Raspberry Pi connected to as DNS/DCHP/Gateway server. On my Pi I use dnsmasq to give each ...
0
votes
0answers
16 views

Where is my firewall?

Using Linux Mint 17 and logged in as root... When I enter the command more /etc/sysconfig/iptables I get the error /etc/sysconfig/iptables: no such file or directory When I enter the command ...
0
votes
0answers
4 views

What's the difference between iptables “state” and “ctstate”?

I saw this iptables snippet in a different Super User answer: iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT ...
0
votes
1answer
9 views

How might one version control Linux kernel firewall rules?

Our router is CentOS but we just use iptables to modify Linux kernel firewall rules. There is a script that's under version control which resets all the chains/rules, but in doing so drops all ...
0
votes
1answer
21 views

iptable rule to allow ftp connections between two networks

I have two machines, machine1 is configured with 192.168.1.0/24 network and machine2 with 10.10.0.0/24 network. I have dropped the communication between the two networks with iptables -P FORWARD ...
1
vote
0answers
23 views

rsyslogd: How to prevent logging in the /var/kern.log file and redirecting to another file?

I am trying to redirect iptables log to another file. Based upon my reading on the net, I did the following: In my iptables rule, I have rules like: iptables -A INPUT -s ... -j LOG --log-prefix ...
0
votes
1answer
10 views

Hairpin NAT with dynamic WAN IP

I have a dynamic WAN IP so if it changes my iptables will no longer apply. Here is my working hairpin nat, where x.x.x.x is my WAN IP br0 - LAN eth1 - WAN -A PREROUTING -d x.x.x.x -p tcp --dport ...
0
votes
1answer
9 views

Choose gateway regarding incomming node

I have a server behind 2 Internet Access. the ip are these: -Server : 192.168.0.1 -ISP 1 : 192.168.0.253 -ISP 2 : 192.168.0.254 I would like that packets coming from ISP 1 receive response using ...
0
votes
0answers
3 views

iptable flow packets to a VM

I want to create a VM to monitor the packet flow. My server is a Debian-based proxmox. How can I set up iptables so the VM sees all packets, but without changing anything else to the setup? Thanks in ...
0
votes
0answers
32 views

Logging LAN traffic with ebtables-iptables-ddwrt

Goal I am trying to log internal(eth0->eth0[via br0]) traffic to syslog on DD-WRT. Problem Bridged traffic is not seen by iptables. The same traffic is also not visible via ebtables. Things I ...
0
votes
0answers
10 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
14 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 ...
2
votes
0answers
26 views
+50

Configuration of DMZ on LRT214

I want to learn more about network technology. Therefore I want to run a raspberry pi in the DMZ as a web server. What is working: Appache Server on the pi is working. When I use it in the LAN and ...
0
votes
0answers
4 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
18 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
11 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
7 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
9 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
12 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
0answers
9 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
8 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
7 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
25 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
20 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 = ...
0
votes
1answer
41 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 ...
0
votes
1answer
34 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 ...
1
vote
0answers
55 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
20 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
19 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
26 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
33 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
23 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
59 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 ...
1
vote
1answer
53 views

Openwrt in bridge mode - ebtables kernel error

I have a setup at home as follow: DHCP clients -----> (wifi)(bridge) Openwrt -----> (eth)Main Router The device I'm using is TPlink MR3020 with Barrier Breaker and I tried to set up ...
0
votes
0answers
25 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
372 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 ...
0
votes
0answers
20 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
42 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
27 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
32 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
14 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
17 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
18 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 ...
0
votes
0answers
16 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
21 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
24 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
13 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
14 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
45 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 ...
2
votes
2answers
133 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 ...