iptables is the userspace command line program used to configure the Linux 2.4.x and 2.6.x IPv4 packet filtering ruleset. It is targeted towards system administrators. Please, when asking a question about iptables, add the output from the following command: iptables -L -v -n

learn more… | top users | synonyms (1)

2
votes
0answers
9 views

How to split traffic through two different network adapters based on TCP port in OS X

I have a scenario where we will be using a Mac to stream video content to an RTMP server. This RMTP service provides 2 ingest URLs so that you can upload the same video content twice and have ...
2
votes
2answers
2k views

mod_evasive DOSSystemCommand not working

I'm trying to get mod_evasive to fire off a script to add an iptables rule to deny the offending host. I've tried the suggestions from both answers here but I still can't get it working. Apart from ...
5
votes
4answers
3k views

Openvpn, forward packets very slowly

I rebooted my server, and an odd issue just came out. I am running on ArchLinux, the clients are Ubuntu, Android and Mac. The problem is that accessing the internet via the clients is slow, about ...
-1
votes
1answer
25 views

Iptables DNAT working in my own network, but not through VPN

For some reasons I need to switch a server ip to another ip, in order to be seen by another computer elsewhere through vpn. So I'm using iptables (didn't know any of that until yesterday) and testing ...
0
votes
2answers
1k views

How to delete all ufw rules for a certain port?

I am using ansible to configure ufw on my DB servers to only let accept connections from certain servers connection to a specific port (lets say 1234). When a server that used to have access is taken ...
1
vote
1answer
429 views

Iptables: how to easily group rules in chain?

I have some netfilter rules like this: iptables -I INPUT -j NFQUEUE -p udp --dport 4444 iptables -t mangle -I INPUT -j MARK --set-mark 100 -p udp --dport 4444 iptables -I OUTPUT -j NFQUEUE -p udp ...
4
votes
4answers
1k views

Automatically ban IP address if it accesses a certain URL

I'm getting bored by all those muieblackcat's and similar scripts ran on web sites. Can I block an IP address (for example with iptables) automatically, like for a hour or so, as soon as it accesses ...
6
votes
3answers
2k views

Limiting interface bandwidth with tc under Linux

I have a linux router which has a 10GBe interface on the outside and bonded Gigabit ethernet interfaces on the inside. We have currently budget for 2GBit/s. If we exceed that rate by more than 5% ...
0
votes
1answer
10 views

what version of iptables implemented -j CT?

I'm setting a firewall config for different distros/versions and I need to setup NOTRACK for DNS traffic. On CentOS 7 (iptables v.1.4.21), I need to write like this: -A PREROUTING -p udp -m udp ...
1
vote
0answers
21 views

Investigating connectivity issue

I'm trying to set a up a new service on a server that is running apache, however it seems like incoming traffic on that specific port is blocked, although I do not understand why. On the first server, ...
0
votes
1answer
43 views

SSH works but tunneling or SFTP doesn't. Why?

since 2014 I've got a server from SoYouStart, with Centos 7. It worked perfectly, but now I had to install again the OS. Now I'm configuring all the services to work again. I need to connect to the ...
0
votes
1answer
28 views

Cannot open port 1337

I am struggling with iptables firewall to open port 1337 externally. My iptables file looks like this: *nat :PREROUTING ACCEPT [0:0] :INPUT ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] ...
1
vote
1answer
12 views

Restore rules from output of `iptables -S`

I have a bunch of rules dumped with iptables -S: -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -p ...
1
vote
2answers
776 views

Allow curlftpfs though iptables firewall, how?

I'v allowed FTP ports 21 and 20 which then allows me to connect to my FTP server via "ftp" command, but I still can't get curlftpfs to work. What ports does curlftpfs all use? Or is their something ...
2
votes
3answers
1k views

NAT with iptables to Xen DomU

I am trying to forward packets arriving on the host machine to a virtual machine. Current aim is to forward xxx.xxx.xxx.xxx:3022 to the vm 192.168.10.2:22. I tried adding the following rules through ...
1
vote
3answers
201 views

Redirect incoming packets to loopback

I'm trying to use iptables to redirect an incoming packet on eth0 to a service listening on the loopback interface. Based on this link I'm attempting to craft the following rule: iptables -t nat -A ...
0
votes
0answers
13 views

PHP FTP Pasv mode on CentOS 7

I need help with connecting to a FTP server and using the passive mode. They told me I need to open ports 20, 21 and 5000-5100 range. I've got a virtual machine running CentOS 7 on a dedicated server ...
0
votes
0answers
4 views

Connection interruptions on Debian router, possibly due to excessive duplicate ACKs? [migrated]

I have a Debian server as a house router, which for a year has been working flawlessly. However, I recently moved and switched service providers from FiOS to Comcast, and possibly as a result am ...
-1
votes
0answers
5 views

How do I set up my iptables to allow web traffic to my Spring Boot application?

I am trying to host my Spring Boot application on Arvixe's VPS Lite. No CPanel, just command line. When I spin up my Spring Boot app and navigate to the server's IP address, I see the ...
0
votes
3answers
2k views

Forward traffic to local LAN IP while keeping the originator IP

I am trying to forward traffic from one server to another, while keeping the origin requestor IP. Therefor I cannot use SNAT or MASQUERADE. SERVER A: Public IP: 111.111.111.111 Private IP: 10.0.0.1 ...
0
votes
1answer
1k views

Gre Tunnel Cisco Linux traffic forwarding

I setup a gre tunnel a cisco router and a Linux machine, the tunnel interface in the Linux box named pic. Well i have to forward traffic coming from cisco through the Linux box. the rules i've set in ...
2
votes
5answers
3k views

How to configure traffic from a specific IP hardcoded to an IP to forward to another IP:PORT using iptables?

Unfortunately we have a client who has hardcoded a device to point at a specific IP and port. We'd like to redirect traffic from their IP to our load balancer which will send the HTTP POSTs to a pool ...
0
votes
2answers
130 views

How to configure port-forwarding to enable internal service accessed by another machine?

I have an existing service which is listening on 127.0.0.1:2009, and I want to access that service from another machine, so I tried to configure port-forwarding to do it: sudo /sbin/iptables -t nat ...
1
vote
3answers
2k views

DNAT to 127.0.0.1 with iptables / Destination access control for transparent SOCKS proxy

I have a server running on my local network that acts as a router for the computers in my network. I want to achieve now that outgoing TCP requests to certain IP addresses are tunnelled through an SSH ...
-1
votes
0answers
18 views

iptables, redirecting all ingoing connexion

I have this iptables conf on my linux mint... What does it mean ? Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- 13.37.42.0/24 ...
-1
votes
0answers
23 views

iptables : redirect all ingoing traffic to www [on hold]

I have a Wifi hotspot, made with a linux machine. I d like to redirect any ingoing trafic to my index.php localsite. My public interface is wan0. Is iptables the best solution ? How can I do that ?
-1
votes
0answers
17 views

Iptabels Port Forewarding Issue

I am trying to forward requests on eth0 (192.168.1.110 port 9600 tcp) to the same port on 192.168.250.2 (reachable through eth1 (192.168.250.150)). This is so that I can leve a preconfigured Raspberry ...
16
votes
11answers
54k views

Using Linux IPTables, How to block torrents or any P2P protocols?

At our institution we had connected 300+ computers to different LAN's with Internet. Included here are Officies LAN, and Internet Laboratory for students. And we want to Control Torrents or any P2P ...
1
vote
2answers
2k views

Iptables - Allowing only a single dhcp (relay) client

I am trying to create a firewall rule on an Ubuntu 10.04 server running isc-dhcpd. I only want dhcp to be accessible by a single relay host (172.1.1.1). I have iptables set up like so: # iptables ...
0
votes
0answers
7 views

PSAD / removed iptables block

I'm pretty new to PSAD but eagerly getting into it to have a safer installation. But some understanding is missing I've had yesterday the following notification : [psad-status] removed iptables ...
0
votes
1answer
22 views

Multiple TAP devices on OpenVPN Server

So we have a number of clients that have their own VPS instances which we host via Proxmox. The clients servers are all behind a NAT firewall and we forward ports per client request to our various ...
0
votes
1answer
907 views

Outgoing IP Packet Capture and Logging with iptables

My goal is to use ipset lists in iptables to log outbound traffic to certain IP addresses. I intend to monitor an entire network passively. I have port mirroring enabled and the port mirrored ...
-1
votes
0answers
13 views

iptables, multiple vpn with selective routing, unable to forward incoming ports

First of all, forgive my incompetence! I have a Linksys EA6900 with Tomato by Shibby v.129. I have set up 2 OpenVPN clients and successfully configured iptables so all traffic by default is routed ...
-1
votes
0answers
11 views

IPTables route only specific IP and ports over VPN

I have a DD-WRT router that is a OpenVPN client. I am trying to get my network to use the regular ISP based connection and only use the VPN connection for a couple specific IPs on specific ports ...
0
votes
1answer
978 views

Masquerade traffic from certain source IP to VPN connection

Network Setup: 10.0.0.1 Router: to internet 10.0.0.70 Server: Ubuntu based server,default gateway is 10.0.0.1 10.0.0.51 PC I created a PPTP connection(interface: ppp0) on Server to a machine ...
-4
votes
2answers
35 views

Using same port for http/ ssh on two ip's [on hold]

How could use two diferent services using the same port on two diferent IP addresses? Example: IP 1 : 192.168.10.10: Service: Http Server Ports: 443 IP 2 : 192.168.10.11: Service: SSH Server ...
0
votes
4answers
104 views

How can I limit SSH access to my own 2 IP addresses? [on hold]

I am getting > 100 attempted logins per minute in my /var/log/auth.log so a quick search online on how to limit SSH access to a particular IP address lead me to a question and answer on here. However ...
0
votes
3answers
7k views

Using iptables to restrict access to ssh by IP

I would like to allow a certain IP addresses or a whole network (source) to reach my servers with ssh connection and to drop all other unauthorized source IP addresses.
0
votes
0answers
6 views

how do --queue-num iptables work?

Relation to --queue-num iptables Example iptables -t nat -A PREROUTING -p tcp --dport 80 -j NFQUEUE --queue-num 30 Explanation The --queue-num option specifies which queue to use and to ...
-1
votes
0answers
8 views

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

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 ...
0
votes
1answer
28 views

NAT TCP/UDP Connections With iptables on AWS

So I've got 2 instances on AWS set up so I can SSH into them directly (A, B) from my home machine C. But I want to set up box A so that I can forward certain UDP and TCP connections from it to box B. ...
2
votes
2answers
1k views

Iptables: Forwarding packets doesn't work

I have 3 Linux Systems A, B and C. A is a TCP Client and sends a message to TCP Server on C. A can see only the external IP of B which is at wlan0 interface, 192.168.0.3 ------------------ ...
-3
votes
0answers
25 views

eth0 as a management interface for port 22 and 3389 and everything else through wlan0 (iptables) [on hold]

I would like to use iptables to: Allow port 22 on eth0 Allow port 3389 on eth0 Disallow everything else on eth0 Allow all traffic on wlan0 (web browsing, etc.) Essentially I want to make eth0 the ...
1
vote
0answers
70 views

How to simulate network partitions on windows? [closed]

Working on a project which implements a clustering algorithm. One important property of the clustering is to respect guarantees when face a network partition. To prove that clustering works I need a ...
-1
votes
0answers
24 views

Do my iptables do what I need? [closed]

I'm an ecologist attempting to write some apps to run unique IR cameras and manage a couple of computers by learning enough linux and networking to get by. I'm not well versed in networking or linux. ...
1
vote
1answer
1k views

Ubuntu iptables logs not going to any log file

I am trying to put logs in iptables but I can not find any log in any file. Although when I run dmesg command, I can see the iptables entries. But the same entry doesn't go to any log file. Here is ...
-4
votes
1answer
24 views

ip6tables -L explanation [closed]

Can someone explain me the following rules in the INPUT chain of the firewall. Chain INPUT (policy DROP) target prot opt source destination ACCEPT all ...
2
votes
1answer
183 views

How to route traffic through different interfaces based on the port number?

iptables -A PREROUTING -i usb0 -t mangle -p tcp --dport 8080 -j MARK --set-mark 1 iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain ...
-1
votes
1answer
20 views

ruleset iptables- user defined chains [closed]

I am very new in iptables. Learning to use them. I got a hang of some basic commands from https://help.ubuntu.com/community/IptablesHowTo. However, I didnt find good explanations of examples of a ...
0
votes
0answers
20 views

Strongswan: Connection established but one way data transfer

Posting Updated: 26.06 11:22 I'm trying to use a rasperry pi on arch linux as strongswan ikev2 server for my windows phone 8.1 smartphone. I would like to use a client certificate for authentication. ...