iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

1
vote
0answers
146 views

Corosync & Pacemaker IPTables Rules

When using Corosync with two rings via multi-cast addresses 226.94.1.1 (Port 5405) & 226.94.1.2 (Port 5406) what iptables rules are required to allow two nodes to communicate optimally without ...
1
vote
0answers
28 views

Prerouting issue

I have three hosts: A, B and C. Let's say host A is continuously communicating with host C (e.g. poll - response). Now, I spoof both ARP tables of host and A and C with host B and want to block ...
1
vote
1answer
181 views

Webserver establishing new outgoing connections from port 443

I've been trying to configure the firewall on a webserver running Apache using iptables commands. I took the approach of blocking all outgoing connections, except for those that are required. ...
2
votes
1answer
37 views

Should IP tables rules affect a serial port on Linux

I'm trying to setup some iptables rules on my embedded Debian Linux system, using a serial console I entered this: root@ts7600-47aad3:~# iptables -F root@ts7600-47aad3:~# iptables -P INPUT DROP ...
2
votes
0answers
117 views

IPtables rule to double NAT [closed]

Let me rephrase it.. I just need an IPtable rule to do double NAT-ting.. Host A - Host B - Host C - Host D Host B should do both source NAT and destination NAT, so that my request from Host A ...
0
votes
1answer
59 views

APF firewall & IPset

Due to too many hack attempts from spam countries, today got the server configured with IPset for iptables. I loaded thousands of ip range in IPset & then added it to iptables with this command ...
3
votes
1answer
78 views

How does iptables recognize packet state?

Consider these two sets of rules: Set A -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -A INPUT -j REJECT -A OUTPUT -j ACCEPT Set B -A INPUT -m conntrack --ctstate ...
0
votes
1answer
127 views

Some packets are flagged as INVALID by iptables

I configured a proxypass rule in order to redirect requests from the port 443 to a JBoss server running on port 8080. All works fine except some 503 errors in the Apache log, around 10 per day: In ...
0
votes
0answers
873 views

IPTables “iptables table `filter': Table does not exist (do you need to insmod?)”

I'm trying to get iptables working for my embedded Debian system, kernel version 2.6.35.3-571-gcca29a0. I've tried to enable iptables support in the kernel by selecting these options (this is a diff ...
1
vote
1answer
223 views

iptables forwarding between subnets

I want to forward traffic between two subnets, I'm not very familiar with iptables. The forwarding works except when iptables is enabled. There must be something wrong with the rules, though ...
1
vote
2answers
80 views

Run shell script based on IPTABLES port access attempt

Is there a way in Linux (RHEL 5-6) using IPTABLES, that if someone tried to access port 21, as an FTP user, to log what the user name they are trying to authenticate as and additionally run a shell ...
0
votes
0answers
29 views

Proper way for setting general policy and firewall rules with libvirtd

I'm just struggling with the firewall configuration of our new KVM Host. I think by now I understand how libvirtd implements networking, but I'm missing a way to set some decent firewall rules. To ...
0
votes
1answer
475 views

how to forward from port 80 to 8080 using iptables without opening port 8080?

The following iptables configuration work for forwarding port 80 to 8080. #nat chains *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A PREROUTING -i bond1 -p tcp -m ...
1
vote
1answer
115 views

Configure port 1935 in iptables for media

On CentOs 6.4 I cannot connect to the media server from port 1935 only 5080. I have read you can edit the iptables files with following. Open flle /etc/sysconfig/iptables: $ sudo vi ...
2
votes
1answer
220 views

iptables: redirect local request with NAT

I'd like to redirect local requests to port which is translated with NAT. I have following rules: iptables -t nat -A PREROUTING -p tcp --dport 9020 -j DNAT --to 10.0.3.11:80 however request coming ...
2
votes
1answer
110 views

Randomizing the source port for new connections

Generally whenever source port is selected by a network application, it is selected in a sequential manner among the free ports like 32000, 32001 and so on. I want to randomize the source port ...
1
vote
1answer
232 views

Route HTTP traffic thorugh different interface

I have my normal eth0 interface and an setup ppp0 interface, the problem I have is that I want to exclusively route all HTTP/HTTPS traffic through the ppp0 interface and everything else through the ...
1
vote
1answer
65 views

How to measure the time a packet spends on the system(router)?

I have a streaming system and one if its components is a router/firewall. I'm using iptables for setting the required behaviour on the router. I'm having performance issues in forms of a constant ...
2
votes
2answers
1k views

iptables redirect outside requests to 127.0.0.1

I have a service running on 127.0.0.1 with port 2222. I need to forward all requests to 192.168.2.2:2222 (outside IP) only from subnet 192.168.1.0/24 to 127.0.0.1:2222. I'm trying to use this, but ...
1
vote
2answers
89 views

Saving an iptables configuration permanently

How can I save this configuration permanently? sudo iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o eth0 -j MASQUERADE
1
vote
0answers
320 views

iptables and physdev match confusion

I'd like to be able to prevent a network bridge from generating certain types of traffic from some of its interfaces. If I understand iptables correctly, packets generate by a device appear on the ...
0
votes
1answer
657 views

Fedora 20, startup script with network settings work correctly but without real effect

First, I love Fedora 20. :) I'm newcomers from Debian/Ubuntu/Suse, but I real like this clean distro. But I found some problems, and can't move forward with this little things. I have 2 PC in home ...
0
votes
0answers
25 views

Routing Application through different network interfaces [duplicate]

I have two interfaces on a server, let's call them eth0 and eth1. The underlying server is running CentOS 6.5 I would like to be able for some application to use eht0 while some others use eth1. ...
0
votes
0answers
49 views

Is it possible to move established connections on one port, to another without dropping data?

this problem has been bugging me for a couple of days now. I can't figure out a good enough solution using iptables without having dropped packets. So here is the back story. Say I have a client ...
0
votes
1answer
64 views

iptables - the meaning of “ERROR: No valid subcommand given”?

I've installed iptables on a embedded device with linux. I believe the installation was successful because all the other apps are working fine (busybox etc.). I try to run them but i get the ...
0
votes
1answer
208 views

iptables Port Forwarding — no service with the port

I have setup a network as in the image below: Firewall (FW) running CentOS 6 has two physical interfaces with subinterfaces: eth0:2 — 10.100.1.78/25 eth0:3 — 10.100.1.79/25 eth3 — 192.168.0.21/24 ...
1
vote
1answer
818 views

How to Block SSH Brute Force via Iptables and How does it work?

I'm planning to add the following rules to iptables to stop ssh brute force attack which are common these days. -A INPUT -i eth0.103 -p tcp -m tcp --dport 4522 -m state --state NEW -m recent --set ...
0
votes
1answer
115 views

PPTP: Allow remote clients to communicate with each other

I have a PPTP server. Clients log in to the server, but can not ping each other. The clients are at different locations. The problem is with my IPTABLES forward chain .... here is my iptables: ...
0
votes
1answer
56 views

why debian repository does not contain lokkit?

I was using lokkit in redhat, and I want to use it in debian, but it seems that debian doesn't contain it...
1
vote
2answers
1k views

FTP and iptables. Connection fails but ports are open

I installed proftp on my machine. With iptables disabled I can connect to the machine, using ftp-client or telnet. With iptables connection fails - telnet says "Connection failed" # works telnet ...
0
votes
0answers
26 views

Run Sys V Init daemon as certain user?

When I installed dansguardian from the repos a long time ago, it set itself up such that in iptablesI could refer to it as --uid-owner dansguardian, which allows me to allow/deny it access to certain ...
10
votes
1answer
605 views

Is it better to set -j REJECT or -j DROP in iptables?

There's an example of iptables rules on archlinux wiki: # Generated by iptables-save v1.4.18 on Sun Mar 17 14:21:12 2013 *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [0:0] :TCP - ...
1
vote
0answers
127 views

Portforwarding: router nat vs iptables [closed]

I would like to host some services on my pc and make them available from internet. (I'm aware of the security implications, it's more like a test for now). I don't have experience with iptables but I ...
2
votes
1answer
71 views

Internet sharing with iptables: choosing which connection to share

I have a computer with two network devices (eth0 and wlan0), both connected to the internet (two different connections/isp). I'm trying to share the connection of wlan0 to another computer connected ...
2
votes
1answer
245 views

Understanding the iptables rules created by FirewallD

I am having a hard time trying to figure out what the iptables rules generated by FirewallD say. Focusing on the "public" input zone, I have the following rules: *filter :INPUT ACCEPT [0:0] :FORWARD ...
7
votes
1answer
135 views

What is the difference between -j DROP and -j STEAL?

I often see that people set STEAL target in iptables rules. It's possible to get this target by installing (on debian) xtables-addons-common and xtables-addons-dkms. I was curious why people prefer ...
8
votes
2answers
1k views

What do numbers in INPUT,FORWARD,OUTPUT chains mean in iptables config file?

I came across the following config file: # Generated by iptables-save v1.3.1 on Sun Apr 23 06:19:53 2006 *filter :INPUT ACCEPT [368:102354] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [92952:20764374] -A ...
7
votes
1answer
2k views

What is the difference between -m conntrack --ctstate and -m state --state

I'm reading this howto, and there's something like this: We can allow established sessions to receive traffic: $ sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT ...
1
vote
0answers
30 views

How to send packets coming from a second router on a particular port back to the router, using iptables not a route

I have a Linux server which runs a particular service listening on a single TCP port. The Linux server connects to the internet using a PPP connection and also acts as router for a local network using ...
0
votes
0answers
42 views

APF IPTABLES automaticly removing allow hosts

I'm using apf for configure iptables. From last 5 days, apf automaticly removing IP from /etc/apf/allow_hosts.rules Please help me to clear this issue.
4
votes
2answers
1k views

Is it better to set rules in ip6tables or disable ipv6?

I have the following network configuration: # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:e0:1c:73:02:09 inet addr:10.1.4.41 Bcast:10.1.255.255 Mask:255.255.0.0 inet6 ...
1
vote
0answers
64 views

setting up a local VoIP to use as a Wifi Headset

I had this idea of using Wi-fi in a vehicle to connect my cell to the car call handler.Just as it works with bluetooth nowadays. Just to demonstrate that such a thing is possible , i had three Linux ...
0
votes
0answers
559 views

Use iptable do redirect all the HTTP traffic to localhost

I use a Linux machine as WLAN Router with the help of hostapd and udhcpd. There's also an Apache web server installed on the same machine. Now I want to redirect all the traffic which comes through ...
3
votes
1answer
175 views

listen to a conversation using port forwarding

I have been able to make a phone calls using the SIP client Pjsua from one Linux computer to another one. In case you have not heard of this user agent, explaining it's functionality is quite easy. It ...
3
votes
1answer
123 views

How to deny access to specific port when destination is NOT a specific host?

I'm trying to DENY access to port 1000 when it is being accessed through any host or IP that is NOT a specific host. I.e. If I try to access the service on sub.domain.com:1000 I should get in. If I ...
0
votes
0answers
131 views

Cloning packets with iptables

I can't figure out for sure, is there a way to clone packets with iptables on one machine? I have an UDP stream to the specific addres (e.g. 192.168.207.201:9702) and I want to do some processing on ...
3
votes
1answer
894 views

IPTABLES is slow after adding '-A INPUT -j DROP' to rule list

I am just getting started with iptables and stumbled across something I don't really understand. FYI, I followed the instructions of Ubuntu wiki's IptablesHowTo. The nat and mangle tables are empty, ...
1
vote
3answers
2k views

iptables-restore just says “FAILED”

I am not sure what's wrong with my rule in the Iptables. I am actually trying to build a SSH server and following a cyberciti tutorial. My Iptables configuration looks like this: # Firewall ...
0
votes
1answer
53 views

Configuring iptables by software

Is there a software, or a linux distro which has such a software built-in, which makes configuring the iptables easier? If not, I thought that some of the mostly used configuarations with a simple GUI ...
2
votes
2answers
95 views

RELATED,ESTABLISHED state in iptables

What do the words 'RELATED' and 'ESTABLISHED' individually signify in RELATED,ESTABLISHED state in iptables?