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

2
votes
1answer
212 views

amule, Fedora 14, iptables

I need to set iptables rules for aMule, but I am not sure which one are the right ones. Googling around, I have seen something like: iptables -I INPUT -p tcp --dport 4662 -j ACCEPT iptables -I ...
2
votes
1answer
180 views

Why does Firefox need a loopback connection?

I was playing around with firewalls and iptables. When I blocked any traffic except HTTP and DNS I was able to establish a connection to google.com via wget google.com. But I wasn't able to open ...
2
votes
0answers
276 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
1answer
243 views

dd-wrt: Keep source ip after port forward

I just started using dd-wrt on my wndr3700, but now all my incomming connections to a server inside the network gets the same source ip as the router. How can I change this back so I get the real ...
2
votes
1answer
3k views

Reverse Proxy for TCP (RDP, VPN, etc) and HTTP

I have a domain that points to my ISP assigned IP though a CNAME (cname goes to my noip address incase my ISP decides to change the IP), I would like to route different subdomains to various IP:PORT ...
2
votes
1answer
1k views

Match multiple strings in iptables

I have 2 strings, and i wish to queue the packet if it contains both the strings ( something like ("jsh"&&"gjhyg")), i tried following ways, but they don't seem to work: sudo iptables -A ...
2
votes
1answer
1k views

Gateway on a virtual network interface used by LXC guests

I'm currently having some problems with configuring a gateway for a virtual network interface. Here is what I've done : I created a virtual network interface : # brctl addbr lxc0 # brctl setfd lxc0 ...
2
votes
3answers
2k views

iptables firewall only allows internet traffic if source port of 80 is allowed

I am configuring an iptables firewall, currently just to allow http and https traffic. It is working but under a particularly strange rule - I must allow incoming connections with a source port of ...
2
votes
0answers
717 views

How do you add a MAC-based routing whitelist with DD-WRT and the OpenVPN client?

I have an OpenVPN client set up on my DD-WRT home router which maintains a VPN into my workplace. Slight problem: I don't want random lusers who access my wireless AP to have access to my company's ...
2
votes
2answers
937 views

Using iptables to selectively route outgoing requests?

I'd like to set up my Dd-WRT firewall so that it uses the VPN service from a VPN provider to access a bunch of destinations and normal route foe all other requests. In detail: giganews.com would be ...
2
votes
1answer
3k views

DD-WRT firewall rule configuration

I'm using DD-WRT on my linksys router. I want to limit each user on my network to 200 connections at any given time. Does anyone know the rules I enter the firewall in DD-WRT admit panel. I tried ...
2
votes
4answers
457 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 ...
2
votes
1answer
264 views

Restrict the number of http and https connections from a specified IP address to ten connections per minute

How I can restrict the number of http and https connections from a specified IP address to ten per minute usingiptables commands? I’ve tried this but it is not working: iptables -A INPUT -s ...
1
vote
2answers
7k 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?
1
vote
2answers
690 views

How to “shut off” all networking on Linux from bash?

I'd like to write a bash/shell script that "turns off" the machine's ability to communicate over it's network card, effectively shutting down all networking. From the command line: # To turn all ...
1
vote
2answers
6k views

iptables - How to forward all external ports to one local port

I want a service to be running on every external port on my system. Since it wouldn't work to start 65535 single instances of that service (I guess...) I thought of using iptables for this. The ...
1
vote
5answers
7k views

Home network to accept only certain MAC addresses from LAN

I have Ubuntu 10 as router with WAN(eth0) and LAN(eth1). How can I restric eth1 to accept only packets from certain MAC addresses and drop the rest? I am also about to setup DHCP to certain MAC ...
1
vote
3answers
970 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 ...
1
vote
3answers
84 views

How to block network traffic on ubuntu gateway via arp table

I have a network with 80 PC and a ubuntu 12.04 as GW. For security reason I want to limit the Computers connected on this network using an ARP precompiled table. In other words I want a tool that ...
1
vote
2answers
105 views

How to check/adjust SSH server on embedded board

I'm currently having difficulties connecting to an embedded board from my Linux machine through ssh. The embedded board is a FOX G20 V with a Linux OS. I've tried to connect to the board through ...
1
vote
1answer
191 views

On Linux, can I forward wlan0 to eth0, and wlan1 to eth1?

I have the following simple situation: two internet connections via two distinct ethernet NICs, eth0 and eth1, and two APs (I use hostapd, of course) on two distinct wireless cards, wlan0 and wlan1. ...
1
vote
1answer
152 views

How iptables behaves on timezone change?

I have doubt how iptables keep changing the info in iptables when timezone is change. I am using iptables s v 1.4.8 I have blocked one IP with following details # date Thu Jun 6 12:46:42 IST ...
1
vote
1answer
2k views

Will increasing number of rules in iptables slow down my internet

How much impact will the rules have on speed, if we are using match to queue the packets.
1
vote
1answer
2k views

Remove port aliases in iptables

How can I make iptables show me port numbers instead of aliases for well known port numbers (eg. http for 80, https for 443 etc.). Is there a way to make it show just port numbers at all times?
1
vote
3answers
47 views

Configuring IPTables to exclude webhost from VPN tunnel

I have a Raspberry Pi running as a server for my webhost. Raspberry pi is connected to a VPN service 24/7. Due to this, I am unable to connect to my webhost using my public IP address issued by my ...
1
vote
1answer
30 views

Block traffic to LAN but allow traffic to Internet (iptables)

On my home network I am setting up a CentOS server that will be used by about a dozen or so for educational purposes - e.g. learn how to use the Linux shell and host websites, among other things. I ...
1
vote
1answer
45 views

Should my server ever need to directly communicate with the NAT gateway?

What I mean by ``directly communicate'' Does it ever need to receive packets with the gateway's IP address as the source IP address, or send packets with the gateway's IP address as the destination ...
1
vote
3answers
6k views

How to block all ports except 80,443 with iptables? [duplicate]

Blocking all ports(in and out) is easy but it's hard with the word "except". I don't know any rules that satisfies the condition. PS: I know this question is nothing new. But in fact, I didn't find ...
1
vote
2answers
274 views

Is Iptables blocking outgoing ssh connections?

I have been trying to do pulls from github and it keeps hanging. My iptables rules have no rules which block outgoing traffic but I cannot connect to github using either ssh or http. I can't even ...
1
vote
1answer
73 views

Forwarding all traffic to other server with iptables

Assume I have a sever with X.X.X.X IP address and a web server with Y.Y.Y.Y IP address. How would I forward web traffic from X.X.X.X to Y.Y.Y.Y using iptables? My servers run Linux and use iptables
1
vote
1answer
299 views

bind/named not working on UDP from external

This one is weird. I've set this up a long while ago, on a centos5. From what I remember, it used to work. For some time now, it's not. I've just been informed so no clue what changed when that made ...
1
vote
2answers
633 views

Is selective VPN routing worth it?

I want to setup routing tables on my RT-N66U router to selectively route traffic through a VPN. For instance, only Pandora requests would go via the VPN. I've found a way to do this with iptables: ...
1
vote
1answer
156 views

iptables detects clients behind NAT?

I'm setting up a server that I want to protect from DoS attacks, by setting a limit using iptables: iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT (default ...
1
vote
2answers
1k views

Route traffic through VPN to some IPs occasionally

I would like to route traffic to some specific addresses through VPN. Easy enough, one can simply add a route: ip route add <destination ip> dev tun0 scope link Here comes the catch: I do not ...
1
vote
2answers
504 views

Why nic with incorrect subnet mask can still ping the gate way?

At first, my network config was like this: $ ip a 2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 3c:97:0e:bd:b1:68 brd ff:ff:ff:ff:ff:ff ...
1
vote
1answer
571 views

iptables NAT doesn't preserve remote IP

I have the iptables rules below forwarding incoming ssh traffic on port 2222 to a virtual machine running in a vmware "vmnet" network on the same host. 192.168.1.1 192.168.1.40 +---------+ ...
1
vote
2answers
119 views

DNS set correctly but website unreachable

I have the (sub)domain elo.bernardinuscollege.nl, which has a DNS A record that points to 54.225.118.87, which is correct (checked it with telnet, which indeed returns the right IP). For some reason ...
1
vote
3answers
490 views

Setting up two ADSL lines for home/business use

As a follow-up to this question which is still unresolved. I have two ADSL routers with different providers connected to different phone lines to the internet. As shown in the diagram. These routers ...
1
vote
1answer
236 views

Can't reach web server from local virtual network

I have installed a couple of virtual machines. Some uder Windows, some under Fedora Linux. On one of the Fedora machined I've installed Apache web server. I have setup server name in httpd.conf to ...
1
vote
1answer
142 views

Valid Type Of Service Values

I need to know what are valid values for TOS field in iptables. I mean when I try to add a rule with ip rule add what can I give as tos value I could not find any resource about tos value. I know ...
1
vote
2answers
2k views

unable to connect to localhost:80 after installing nginx

I just installed nginx by doing sudo yum install nginx and I'm unable to connect to it on port 80. I tried stopping iptables by doing sudo service iptables start and was still unable to connect. I'm ...
1
vote
1answer
73 views

iptables -L lags on non localhost or anywhere address

I am trying to configure iptables for ubuntu 10.04 and I have a problem with iptables -L lagging on rows where the destination or source address is not localhost or anywhere. The following entries ...
1
vote
1answer
940 views

Rerouting traffic from port 80 to another port on a single ip

I have a server with multiple IP addresses associated with it. I'm trying to run a node.js web server (which I do not want to run as root), using only one of those ip addresses (it would be very bad ...
1
vote
2answers
5k views

How to alias an IP address to make DLNA resource accessible from different IP network

what I have I have a home wifi network 192.168.1.0/24 having DLNA resource 192.168.1.100. I have a TV with ethernet and a netbook with both wifi and ethernet interfaces. I want to make my notebook ...
1
vote
1answer
3k views

iptables trouble: nat with ip alias (virtual interface) not working

I'm setting up an Ubuntu 11.10 server to act as firewall for a network running several different SSL websites. The idea is fairly common: have all public IP's for each site aliased to the public ...
1
vote
1answer
3k views

How do I block all ports except 22 and 80 in Fedora's iptables? [duplicate]

I am trying to only allow port 22 TCP/UDP and port 80 TCP/UDP from anywhere using Fedora 15 iptables, and all the rest will be never accessible nor scannable from a public network. But it never ...
1
vote
2answers
3k views

Setting up a Linux server with a public Static IP

I have setup a Ubuntu Linux server in an office. It should have a public IP so that outside users can access the internet. Currently, it is set with a public IP, but is it supposed to have a local ...
1
vote
1answer
639 views

Feedback to router users during access-restricted hours for DD-WRT

Following router schedule rules that I change often, the stock firmware on my D-Link 825NA rev. B redirects HTTP requests to a built-in "Access denied!" warning at appointed times. I just upgraded ...
1
vote
2answers
2k views

Howto compile a kernel module on CentOS [required packages]

What yum commands do I need to get available packages installed on CentOS to build a iptables MATCH kernel module.
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 ...