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

5
votes
0answers
4k views

How do I configure DD-WRT to forward IPSec traffic to an internal server to support a road warrior configuration?

I use dd-wrt as my home router setup and that's been working fine. Now I wanted to figure out a way to be able to use my iPad to set up a IPSec tunnel to my home network while I'm on the road. PPTP ...
4
votes
0answers
236 views

Iptables error :libipt_cgroup.so doesn't exist while using net_cls.classid in net_cls cgroup subsystem

In kernel document doc/cgroup/net_cls.txt, it introduces the function of net_cls.classid, and show an example of netfilter (iptables) using this tag to perform actions. the command of iptables is: ...
4
votes
0answers
3k views

Route outgoing VPN traffic through local transparent proxy

I have a Digital Ocean droplet (similar to an Amazon EC2 instance) running Ubuntu Server 12.04.3 x64 with both strongswan 5.1.1 (built from source) and squid 3.4.2 (also built from source) installed. ...
3
votes
0answers
19 views

VPN connection problems regarding plex media server and voice over IP

I have a home server - running Debian Jessie and plex media server. My router (fritzbox) allows all smartphones in my LAN to receive incoming landline calls (due to a certain app). This part works ...
3
votes
0answers
129 views

Why do different users get different IP via the same interface

On the same server, on root, I am getting the correct internet ip of the interface root@server:~# curl -s --interface ppp0 ipcheck.com 111.111.111.111root@server:~# However... If it's not super ...
3
votes
0answers
39 views

How can I read out the value of internal counter inside IPSet

I know there is an option named “counters” when creating an IP set with IPSet. However, I want to know how to read the value of the counters out, so as to know how many packets or how much data has ...
2
votes
0answers
63 views

How do I kill existing network connections on Linux?

I've been working on a project that is nearly complete: to be able to kill my children's internet connections at the touch of a button. I've implemented part of the solution by basically calling: ...
2
votes
0answers
42 views

Simulate SNMP Trap with SNAT

I have to test SNMP 2c Traps. I want to send those traps from some computer and the trap destination has iptables. So before the trap enters the NMS, I could just rewrite the real source of the trap ...
2
votes
0answers
332 views

Modify incoming packets before forwarding in Linux

I’m using a Linux (Debian based) system on which IP forwarding is enabled (/proc/sys/net/ipv4/ip_forward is set to 1). I can read the incoming packets using a raw sockets program, but I want to modify ...
2
votes
0answers
163 views

Determine if an uplink interface is usable

I have a firewall system that is served by two uplinks to different ISPs. I'm using shorewall to manage the firewall; it load-balances traffic over both interfaces with connection tracking. All that ...
2
votes
0answers
470 views

Limit bandwidth on HTTP downloads based on file size

Is there a way to limit lets say in iptables or any proxy solution/software if a user is downloading a filesize that is greater than lets say 20MB it will limit his entire download at 2KB/s? ...
2
votes
0answers
357 views

Centos iptables blocks after reboot

I have a Centos5 installation with kvm on my server. I am using nat portforwarding to ssh my virtual machines. I have several iptables rules and saved then in /etc/sysconfig/iptables. After reboot, I ...
2
votes
0answers
549 views

Why does my Tomato router seem to behave badly as time passes

I've set up a Firewall script on my Tomato router (a WRT54G 2.0, actually) that seems to behave correctly at start, but after one or two days, it seems that the script does not work anymore... The ...
1
vote
0answers
34 views
+50

iptables reject tcp-reset on loopback

I am trying to check how a software would behave if there is a network failure. That software is using tcp send() and recv() to communicate. Previously I was making the software communicate by ...
1
vote
0answers
24 views

How to make proxy server for firefox with linux iptables

I want to use the proxy options in firefox to forward all my connections and network packets to a proxy server (Linux-VM) that will then forward the packets to the real router. The VM is connected to ...
1
vote
0answers
20 views

Run Tor proxy before a VPN

I heard people say that running Tor's proxy before using a proxy is safer. How do that accomplish that? Would it be running proxychains with Tor's proxy on top of the list with other proxies? Would ...
1
vote
0answers
27 views

How to redirect traffic on Raspberry from USB dongle WiFi to local application

Good morning gentlemen, my RPi 2 is a working access point with two WiFi dongles (each with its own range of IP addresses); the RPi is also connected via LAN cable to my modem. It offers the most ...
1
vote
0answers
17 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 ...
1
vote
0answers
60 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 "...
1
vote
0answers
29 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 ...
1
vote
0answers
32 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 ...
1
vote
0answers
111 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 ...
1
vote
0answers
28 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 ...
1
vote
0answers
43 views

Sharing internet connection from USB0 to WLAN0

I want to create a wireless AP from my kali linux machine to share internet connection to other devices. Internet connection to linux is given by USB tethering using an android mobile phone. There is ...
1
vote
0answers
59 views

Raspberry Pi iptables not working without active eth0

I just work on a AcessPoint, hosted from my Raspberry Pi B+. When a cable is plugged in on the eth0 adapter it all works fine. If someone connect to my AP, they will be redirected to the webserver, ...
1
vote
0answers
34 views

DD-WRT Router and Squid3 transparent box denying everything

As the title implies, I have a DD-WRT router that I use for the wi-fi network. What I want is to have my wi-fi traffic sent to my squid box so that I can monitor what is being sent over the wi-fi ...
1
vote
0answers
85 views

iptables - NAT/PAT rules for HTTPS, HTTP, RDP, SSH

I'm trying to set up a gateway/router box and can't seem to get my iptables quite right. The goal is to have a private network of windows boxes that can talk to WAN for HTTPS, HTTP, and SSH. I want ...
1
vote
0answers
46 views

How can I use Ubuntu as a gateway into a remote LAN?

I need to be able to access whole remote subnets from a Windows PC. Here's my network layout: I -{MyLAN: 10.77.77.0/24, DHCP}--[Ethernet: 10.77.77.64] N (Windows 10 ...
1
vote
0answers
93 views

rp_filter not working, still get martian errors and dropped traffic

I am using the below commands to setup test environment for traffic flow. I am using a bash shell for traffic source but would eventually be VM or container. I don't understand where the traffic is ...
1
vote
0answers
63 views

Send all outbound HTTP traffic from a rogue Wi-Fi router to an internal prank site

Today I discovered that my teenage son installed a rogue Wi-Fi router. It is plugged directly into the ethernet jack that I forgot was in his room. I assume he did it to bypass my internet schedule (...
1
vote
0answers
17 views

How can i implement this iptables configuration with 2 gateways?

I'm trying to configure a firewall hardware to protect my nas. What i want to achieve is explained better with this image below: network scheme While the actual iptables config is the following: *...
1
vote
0answers
327 views

Compile iptables from source make error

I'm trying to compile latest iptables 1.6, but I receive the following error: (./configure it's OK) then I call make and: xtables-config-parser.y:20:28: error: libnftnl/table.h: No such file or ...
1
vote
0answers
114 views

Setting up RTMP for streaming (Console)

So I have been trying to set this up for the past few days and I am having so much trouble actually getting this to work. I have installed Nginx with the optional RTMP module onto my Mac and I also ...
1
vote
0answers
32 views

Problems with opening ports on Linux

Basically I have tried every tutorial I could find but I can't seem to open a port in a Linux VM. I tried downloading gufw and opening a port there; didn't work. I disabled gufw; didn't work Set a ...
1
vote
0answers
181 views

tomatousb - Allow only specific IP to connect to other IP port

I'm using tomato shibby on a router, and I'm trying to set some specific rules using iptables to set the following: I have a server, which runs on 192.168.1.2 (LAN) port 2232. Everybody from the LAN ...
1
vote
0answers
65 views

iptables SNAT target and TCP ACK packets

I need to establish a TCP connection where the client is spoofing its IP for all outgoing traffic. My first attempt was to add a rule to the POSTROUTING chain like so: iptables -t nat -A POSTROUTING -...
1
vote
0answers
186 views

Can't ping server itself after connected to PPTP VPN

I've set up a PPTP server on a CentOS 6.5 machine to use VPN from public networks and other miscellaneous scripts. Everything seem to be working OK except I can't ping the VPN server by its public IP ...
1
vote
0answers
89 views

OpenVPN and port translation

So, here's the deal. I have an openvpn instance on a port 443. I need it to also be on port 993, the same instance, the same virtual network. Openvpn can not really do that, but Linux comes with ...
1
vote
0answers
37 views

How is Windows ICS service different from Linux-based NAT & routing when I want to hide my LAN structure from ISP?

Background I've been using a WIFI-router as my home gateway perfectly until my ISP appears to restrain the number of connected devices. And currently there is not any realistic upgrade plan from the ...
1
vote
0answers
170 views

Can I track the CPU load that IPTABLES firewall is causing?

Since IPTABLES is a software based firewall, I am wondering if it is possible to log the exact load it is causing, cpu cycles, etc. On a small system I am sure it is trivial. But how about with ...
1
vote
0answers
152 views

Too many connections from other IP addresses and my own IP address

I get thousands of connections from same IPs. It takes down my web server (Apache). How could I restrict 1 ip to open only 10 connections max using ip table rules? My 2nd issue is there are so many ...
1
vote
0answers
63 views

Most efficient way to proxy a port from one host to a port on another

I have a host with one IP address which is using port 443 (HTTPS) with one certificate. I want to run a second app on this IP address using a different certificate on a different port. To prevent ...
1
vote
0answers
198 views

Error mounting NFS unit between synology server and Raspberry Pi client

I'm trying to mount an NFS (v4, or v3.. but get the same error...) from a Synology Server to a Raspberry Pi client. But I get this error: mount -t nfs4 IP_address_of_server:/volume1/nfsnvf /mnt/...
1
vote
0answers
976 views

How to route traffic from one interface to another regardless of source ip?

I asked this question on network engineering, but they told me it was off-topic there and I should therefore try on superuser. So, I'm deploying some raspberry pis for a specific network task. I'm ...
1
vote
0answers
126 views

Why does iptables not doing DNAT for the same subnet?

I have the following NAT setup: Whereas Host 1 has a VM with IP 10.0.0.3 and HOST 2 has a VM 10.0.0.4. The NAT box will have a NAT rule such that it changes the dest IP 172.24.4.2 to 10.0.0.4: -A ...
1
vote
0answers
556 views

how to port forward to server + tunnel specific hosts route though openvpn client on tomato

Running Shibby Tomato v130 on an Asus RT-N66U. My goals are the following With Transmission running on the router have all torrent traffic route through an OpenVPN client also running on the router....
1
vote
0answers
250 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; #...
1
vote
0answers
100 views

Iptables: dropping/rejecting new and invalid connections

I'm very new to iptables and my goal is the block NEW and INVALID connections on the INCOMING chain and log any attempts for a NEW connection. I'm also letting any and all traffic out on the OUTGOING ...
1
vote
0answers
335 views

Why do my nat iptables rules not work with marked packets?

System: debian squeeze, Linux server 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC 2014 x86_64 GNU/Linux, iptables v1.4.8 lsmod | grep iptable iptable_security 2176 0 iptable_mangle ...
1
vote
0answers
218 views

Use Ubuntu Iptable to route public ip to pc in private network

I am currently set up a Ubuntu server as a Router which has two network interface. eth0 -> Connecting to public internet ( 10.10.1.78 ) eth0:1 -> 10.10.1.79 eth0:2 -> 10.10.1.83 eth0:3 -> 10.10.1.81 ...