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
3k 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
494 views

Block all outgoing traffic for a User running Wine apps

Good day, I'm using a lot of WINE apps under Linux which work just fine, but one thing I am specifically looking for right now is to block their access to the internet (outgoing), with exception of ...
4
votes
0answers
195 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
2k 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
108 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
26 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
34 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
219 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
2k views

Synergy client won't connect, despite open port?

I want to use a Debian KDE desktop computer (network name bradbury) as the server, and a Windows 7 laptop (network name Clarke) as the client. I have used this setup before without problems, but then ...
2
votes
0answers
159 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
416 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
346 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
546 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
40 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
12 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
41 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
28 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
95 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
40 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
119 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
58 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
25 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
194 views

Is it possible to setup a NAT loopback on a router with a dynamic IP using iptables?

I've set-up a Raspberry Pi home server attached to my router. I have a dynamic IP. I can access the server within my network using the internal IP (192.168.0.8). I can also access the server outside ...
1
vote
0answers
89 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
90 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
39 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
121 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 ...
1
vote
0answers
671 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
84 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
486 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 ...
1
vote
0answers
180 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
77 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
223 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
139 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 ...
1
vote
0answers
540 views

DDWRT - Virtual Interface - firewall command - RDP

I have DD-WWRT flashed on my Linksys e2500v3 router. I added virtual interface to create a guest wifi network that would have access to the internet, but not to the private network or router. At ...
1
vote
0answers
303 views

Configuring iptables for guest WLAN in DD-WRT

I'm constantly failing to get a guest WLAN in DD-WRT working. I can connect to the second SSID and get an IP address of the second DHCP server range. But I cannot connect to the internet. I followed ...
1
vote
0answers
319 views

Open ports with iptables — still closed

I'm trying to open some ports for a gameserver, which is running on my Linux vServer (Ubuntu 14.04 LTS 64bit). The game needs the following ports: 16261 (UDP) 16262 (TCP) // Player 1 16263 (TCP) // ...
1
vote
0answers
100 views

How to configure iptables to set public IP for outgoing traffic from private IP

I have multiple public IPs at home: 1.1.1.1 (main IP) 2.2.2.2 (additional IP) In my local network, I have two computers, let's say 192.168.1.1 (PC1) 192.168.1.2 (PC2) Infront of the computers I ...
1
vote
0answers
168 views

Limit connections per second with iptables/ufw

How can I tweak the following entries to allow more requests per second? Maximum hitcount is 20 if you do not edit some other config files. The entry of my /etc/ufw/before.rules file -A ...
1
vote
0answers
166 views

Nodejs remote debugging ports closed

I have a problem with nodejs remote debugging. I'm using centos on remote server and phpstorm on my PC. When I open putty I type the command: node --debug-brk=5858 main_server.js, and get the ...
1
vote
0answers
27 views

Preserve NAT mappings across reboot

My Linux router is able to reboot and reconnect all network interfaces pretty fast (~10 seconds, thanks to systemd and a SSD disk), and comes up with the same IP addresses. Unfortunately the reboot ...
1
vote
0answers
36 views

IP rule table look up does not seem to work

I have a sytem with three network interfaces. Below is the configuration that I'm trying to set up. wlan0 (its actually an WiFi AP interface) - other devices connects via this interface. net1 - ...
1
vote
0answers
30 views

Is it possible to know a user logged in on Ubuntu instantly?

In fact, I am trying to restrict access to some websites for different users. I asked the question: Restrict access to some websites for different users. The given answer is ok; but as the owner ...
1
vote
0answers
166 views

Site to Site VPN - Openswan and CISCO A2A

Below is the diagram that the VPN connection between Openswan server and CISCO A2A. client A and B are remote hosts with static ips. client X and Y are behind the Cisco firewall. I can see ...
1
vote
0answers
554 views

Intermittent disconnections when using OpenVPN over SSH tunnel; possible iptables issue?

I've recently set up a Debian Wheezy server with OpenVPN to help out some friends in areas where internet censorship is a problem (including the blocking of VPN traffic in general). To overcome this, ...
1
vote
0answers
1k 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 ...
1
vote
0answers
319 views

iptables configuration on Windows Azure (CentOS 6.5) for endpoint load-balanced set

I created 2 VMs (CentOS6.5) on Windows Azure for Postgresql database and HA cluster, everything works fine except when I set iptables service on, the endpoint load-balanced set is down. for security ...
1
vote
0answers
253 views

Allow internet access to intranet only users using Nginx on Ubuntu

I need to allow some users who only have access to the intranet to access one specific internet site. I'm doing this by using Nginx as a reverse proxy. To test this, I would like to block all internet ...
1
vote
0answers
311 views

Can't connect to web server from outside my network

I have a Debian-based server that I would like to be able to access from the Internet (no domain name yet, I'm just trying to get it working for now). I already have port forwarding set up on my ...
1
vote
0answers
626 views

Conntrack/NAT's port mapping for a specific port breaks whenever that port's service is shutdown for too long. How can I fix this?

Linux Gentoo 3.13.6-hardened-r3 #1 SMP Sat Apr 12 09:17:25 EDT 2014 x86_64 Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz GenuineIntel GNU/Linux hardened with grsecurity and selinux with a strict policy in ...