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

1
vote
3answers
1k views

iptables LOG actio writes to STDOUT

when I use LOG action in some chane of iptables rules, I get the output both in STDOUT or STDERR of the xm console and in /var/log/messages. Is there way to make iptables to write only to log ...
0
votes
3answers
114 views

how do i set up this firewall?

i use fedora 13, and i have firewall turned off now. but i want to allow all incoming connections and outgoing connections except to a port P. i want to allow connection to port P only from certain ...
6
votes
1answer
4k views

How to deliberately introduce a delay for incoming UDP packets

I want each packet (that match iptables rule) to be delayed by some fixed time interval. How to to this? Preudocode: iptables -A INPUT -p udp <more conditions> -j DELAY --delay 50000 # delay ...
2
votes
2answers
496 views

Why after Accepting Ports 20 and 21 in iptables are they still closed?

I am trying to open the FTP Ports on my server. I have vsftpd installed on the server already. However I am unable to reach the server on ports 20 and 21 Somehow it is allowing me to access port 21 ...
0
votes
1answer
336 views

how do I forward *only* http proxy across vlans?

My router has two bridges, br0 and br1. I'm sharing wifi access, and the guest subnet will be 192.168.2.x. The home subnet will be 192.168.1.x. I want all traffic destined for port 80 from the ...
1
vote
2answers
8k views

Block all ports except SSH/HTTP in ipchains and iptables

How can I block all ports except ssh (port 22) httpd (port 80) using iptables and iphains?
2
votes
4answers
471 views

Block all but http traffic on a network interface

I've got two network interfaces on an Ubuntu machine which go out to two different networks but both have internet gateways. I need to limit it so that any outgoing http requests it makes (ie ...
1
vote
1answer
157 views

How to setting up iptables for traffic fowarding on port 80 from specific sources

Im running a web server on port80, but i want traffic coming from ip 212.333.111.222 on port 80 to be fowarded to port 9020 on the same server that my web server is rinning at that is my sshd port
0
votes
1answer
190 views

iptables: separate clients from each other

is there a way to separate clients in a subnet so that they cannot reach each other? The infrastructure currently looks like this: 192.168.0.1/24 Gateway, a CentOS box with iptables. ...
18
votes
1answer
37k views

What are the iptables rules to permit ntp?

My server's clock is wrong because the firewall doesn't permit ntp traffic. What are the iptables rules required to allow the ntp client to get out and back? Any suggestions how to implement those ...
1
vote
2answers
2k views

Routing from the DMZ to the interior network only

I have a home network connected to Verizon's FIOS service. Verizon's ActionTec router is connected to the ONT via coax to establish the MOCA network. My DD-WRT router's WAN port is connected to one ...
2
votes
1answer
936 views

What do these numbers mean in the output of iptable-save?

In the output of iptables-save # Generated by iptables-save v1.3.8 on Sun Mar 14 19:42:45 2010 *filter :INPUT ACCEPT [328764:37367248] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [324693:28884726] COMMIT # ...
2
votes
2answers
1k views

linux: how to run aria2 or wget only through eth0

I have a computer under Linux with several network cards, for example: eth0, eth1, eth2, eth3. Is there some way to run any downloader, like aria2 or wget only through one interface, for example eth0? ...
1
vote
3answers
3k views

iptables syntax to forward remote desktop requests to a virtual machine on CentOS host

I can rdesktop into a VM running Windows XP hosted on my CentOS 5.4 machine from the hosting machine and work just fine using the private address (192.168.122.65), but I now need to allow remote ...
1
vote
1answer
258 views

One website not connecting over shared connection

A website is not opening on a computer that's connected via shared connection (not exactly "shared"). Pinging the website gets Packet filtered message. The setup of my home network is done by Ubuntu ...
4
votes
1answer
2k views

Blocking access to a specific url

I have a lightweight linux device which I would like to block from accessing one specific URL. Instead of making the request to the external URL, I would like to return the contents of a local file. ...
0
votes
2answers
3k views

How to use FQDN in firewall rules for GNU/Linux?

I'm trying to setup a firewall for one of GNU/Linux systems. AFAIK, iptables and its ilk cannot make use of FQDNs in their configuration, since they're expected to be operational before the network ...
2
votes
5answers
14k views

What Iptables rules need I to forward a windows remote desktop connection?

I have this situation: network mask. 255.255.255.0 router/gateway: Ubuntu server (only command line, no gui) with internal lan ip 192.168.0.2 and a dynamic dns on the external ip Windows pc on ...
4
votes
3answers
3k views

Block a user from accessing internet on Linux

How do I block a user from accessing the internet under Linux? I'm trying the following: iptables -A OUTPUT -p tcp --dport 80,443 -m owner --uid-owner $USERNAME -j DROP Is that the right syntax or ...
2
votes
2answers
288 views

Logging communication between two VMs

I'm trying to set up "malware lab" described in this paper. So far, I've set up Windows guest system, adding one Host-only Network adapter, and setting this (sorry if the names aren't exactely ...
17
votes
4answers
11k views

With Linux iptables, is it possible to log the process/command name that initiates an outbound connection?

I would like to keep track of the processes that initiate outbound connections on a Linux desktop. The best I can come up with is this: iptables -A OUTPUT -m state --state NEW -j LOG --log-uid This ...