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

0
votes
1answer
119 views

Mark packets across computers?

I use Transmission on Ubuntu and I'm having this issue, which basically says that QoS is broken because there is no way to limit which outgoing ports uses. I was thinking of doing a dirty and ugly ...
0
votes
1answer
295 views

Push local traffic “outside” the nat

I have a server functioning as my nat that hosts some services. When I locally connect via UDP to this server it my client uses the public ip but the server answers with its local ip. So the question ...
3
votes
1answer
2k views

Allow access from outside network with dmz and iptables

I'm having a problem with my home network. So my setup is like this: In my Router (using Ubuntu desktop v11.04), I installed squid proxy as my transparent proxy. So I would like to use dyndns ...
0
votes
1answer
812 views

Linux, how to force all traffic to specific host over VPN?

I'm trying to ensure that all traffic to our stats server is forced over the VPN, in the case that the VPN falls down, it shouldn't be that the traffic tries to route over the WAN. To short-circuit ...
8
votes
1answer
8k views

How to negate a range in iptables?

I've seen people use the exclamation mark (!) in multiple examples, but when I try to use it I get an error. The rule I'm trying: -A OUTPUT -m owner --gid-owner 1006 -d ! 192.168.1.0/24 -j DROP The ...
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
0answers
815 views

Iptables port redirecting. Rule doesn't work or show up in iptabels

I'm trying to redirect some incoming TCP traffic on port 443 to port 999 with iptables in an Ubuntu VM. I am using sudo iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT ...
1
vote
0answers
629 views

SSH login with secure IP VPN

I have a PC behind a router with port forwarding setup Port 22 for SSH which works perfectly - I can login and everything. What I am trying to do is let this PC connect to a VPN and only allow ...
0
votes
0answers
480 views

filtering Internet traffic and caching on another machine using a dd-wrt router

In my home network, I have a spare machine which I would like to configure to filter Internet traffic (block ads) as well as cache content. I would like to tell my DD-WRT router to pass all Internet ...
1
vote
0answers
100 views

Portforwarding to VM doesnt work.. anymore

I have a windows 2k8 server vm on my Ubuntuserver which I use for i.e terraria & apache. It was working great before a little minor accident when the electricity stopped flowing through the cables ...
2
votes
1answer
192 views

Secondary NIC: what all can I do?

I was loaned a NIC which I promptly installed in my F16 workstation just to 'play' with it (using iptables and stuff). Other than forwarding packets from the new NIC to the old NIC using various ...
3
votes
2answers
4k views

How to blacklist IPs on Windows 7?

I'm trying to find something similar to iptables in Linux for Windows. I've tried using Windows firewall as well as editing the host file to block specific IPs, but had no success. I've also tried ...
-1
votes
1answer
484 views

Open a linux port without using iptables in Centos? [closed]

just a quick question, is it possible to open a port on linux Centos without using iptables? If so, how do I do that from the command line?
0
votes
2answers
3k views

IPtables: Blocking all traffic on an interface except select ports

I have four interfaces on my system (eth0, eth1, eth2, and eth3). I want to block all incoming and outgoing traffic on eth2 except for port 80 and 443, although I'm only worrying about 80 right now. ...
3
votes
1answer
2k views

Why is this iptables rule that does port forwarding not working?

I have a server bound to localhost:7060. It is using ipv6 socket instead of ipv4. Below is netstat outout. # netstat -an Proto Recv-Q Send-Q Local Address Foreign Address State tcp ...
0
votes
2answers
839 views

How to drop traffic before it hits existing iptables conntrack rule?

I am running an application that injects iptables connection tracking rules into the kernel so the machine can forward incoming UDP traffic to its destination as fast as possible. Some of the ...
0
votes
2answers
335 views

In Linux can I direct all traffic from a specific ip address or mac address to file

In Linux can I direct all traffic from a specific ip address or mac address to file. I am look of a way to take all traffic from a specific ip address or mac address and put it into a file. Does ...
15
votes
3answers
16k views

How can I check if an iptables rule already exists?

I need to add a rule to iptables to block connections to a tcp port from the Internet. Since my script may be called multiple times and there is not a script to delete the rule, I want to check if ...
5
votes
2answers
3k views

Blocking Skype using snort and iptables

I am trying to block Skype using snort and iptables. I read a lot of papers and blocked the port, keywords and patterns which Skype uses. But it is still not blocked. My question is: if Skype uses ...
5
votes
5answers
7k views

How to block sites with iptables

I would like to block sites using iptables. How do I go about this, and how do I ensure that the iptables rules are saved?
0
votes
1answer
397 views

How can a PPTD VPN route traffic to other servers on network?

I a have a number of servers which expose various public services to the web. These are behind a server which is acting as a firewall using IPTables and forwards traffic to and from the servers. All ...
8
votes
2answers
9k views

Setup routing and iptables for new VPN connection to redirect **only** ports 80 and 443

I have a new VPN connection (using openvpn) to allow me to route around some ISP restrictions. Whilst it is working fine, it is taking all the traffic over the vpn. This is causing me issues for ...
1
vote
2answers
847 views

Firestarter device not ready when booting Ubuntu

I am trying to get firestarter running on Ubuntu 11.10 and I am getting an error: Failed to start Firewall The device eth1 is not ready. Please check your network device settings and make sure ...
1
vote
1answer
4k views

Ubuntu 11.10 firewall/gateway - no client internet access

I have read many other posts but cannot figure this out. eth0 is my external connected to a Comcast modem. The server has internet access with no issues. eth1 is internal and running DHCP for the ...
4
votes
1answer
6k views

How to use iptables to forward all data from an IP to a Virtual Machine

OK, in an attempt to get some response, a TL;DR version. I know that the following command: iptables -A PREROUTING -t nat -i eth0 --dport 80 --source 1.1.1.1 -j REDIRECT --to-port 8080 ... will ...
1
vote
1answer
344 views

iptables Settings as WAN Input for Router

I have an eee running ArchLinux with wireless access to the Internet. I want to use it as the WAN input for an Asus RT-G32 router into which it is hardwired. The router in turn is hooked up to a ...
0
votes
1answer
2k views

will the left|rightfirewall option of StrongSwan open UDP 500/4500 and protocol number 50 on iptable?

I know the StrongSwan use UDP 500 and 4500 for IKE traffic and IP protocal number 50 for ESP packages. I am not sure the usage of left|rightfirewall ...
0
votes
1answer
234 views

conectivity problem

I have 2 PCs (anuin and hed), both running Linux that are connected via ethernet (192.168.1.1 and 192.168.1.3). Both PCs can ping each other. anuin is connected to the internet via an USB-stick ...
0
votes
3answers
84 views

Chaining subnet fails

Is it possible to do the following: Machine1 Kubuntu 8.04 desktop wired internet Cable modem Machine2 eepc701 Xubuntu 1O.04 wired machine1 cross ethernet cable Machine3 nokia n900 wireless to ...
1
vote
1answer
3k 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?
0
votes
1answer
778 views

iptables + vpnc + Cisco IP Phone 7941

I have a Linux gateway with kernel 2.6.39 connected to a Cisco ASA 5500 with vpnc. I'm using iptables with masquerading and forwarding to give the LAN access to the tun0 device connected to the VPN. ...
3
votes
1answer
469 views

Why small TCP connections succeeds, but big ones fails?

Sometimes from Linux system I see the following weird behaviour: I able to ping things and sometimes use some services, but networking is very bad. For example, now I routed connection through my ...
1
vote
0answers
104 views

How can I restrict my Virtual Machine using an iptables rule?

I am using CentOS Linux and am planning to setup a rule on my VM's iptable. I want to restrict all outgoing and incoming packets to the VM for a temporary period and allow only the DHCP packet to ...
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 ...
0
votes
2answers
133 views

iptables ACCEPT policy

In Redhat EL 6, iptables INPUT policy is ACCEPT but INPUT chain has REJECT entry in the end. /etc/syconfig/iptables is as below: *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] ...
2
votes
1answer
4k views

DD-WRT Setting Up Guest Network

I have a router on which I installed DD-WRT firmware. I am trying to set up a virtual interface to use as a guest network. The guest network should be on the 192.168.8.0/24 subnet while our LAN is ...
0
votes
2answers
326 views

Blocking a botting URL to an Linux server running Apache

I have a webserver running OpenSUSE 11.1 and I need to block a URL. The reason I want to block a URL is because it seems to have a different IP address all the time, but the URL stays the same. I'd ...
1
vote
3answers
632 views

I need a traffic monitor for Linux, that only counts in a specific wireless network

I need a simple traffic monitor for Linux, that counts the traffic in a specific wireless network because I have volume restrictions on that one. I tried it using the following iptables rule: ...
2
votes
0answers
781 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 ...
1
vote
1answer
579 views

Fedora 14 system-config-firewall-tui gone?

On Fedora I used to be abble to configure custom ports into the Firewall by going to setup and following the required steps till I got to something like this: Well that menu is here no more. I can ...
3
votes
1answer
2k views

Properly portforwarding the external IP with iptables

I am trying to forward all the incoming internet/LAN requests on port 80 to my local machine (running Apache), current iptables work (forward incoming internet traffic to my desktop, but if I try to ...
4
votes
2answers
5k views

Ubuntu 11.04 server iptables port forwarding

I'm pretty new to iptables. My server has two Ethernet cards (eth0, eth1) and an ADSL router that is in bridge mode connected to the eth0 which created ppp0 when dialed. I'm trying to forward ...
5
votes
1answer
519 views

Rackspace Firewall/Gateway Setup

I have rackspace account and wish to have this sort of setup: Firewall/Gateway eth0 - Public IP (56.X.X.X) eth1 - Private IP (10.X.X.X) Ubuntu 10.10. Accepts connections from the internet and ...
0
votes
1answer
3k views

iptables openvpn forward selectively from eth to tun

Simple for those who know, indecipherable for those who don't... I'm running openVPN on (hypothetical) 66.66.66.66, I want to FORWARD incoming traffic, arriving on interface eth0 to interface tun0. ...
0
votes
1answer
2k views

How do I get an iptables redirect to survive a reboot on SuSE 11?

I've set up iptables to forward from port 80 to port 8090: iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8090 However the redirect is gone after rebooting. What's the ...
3
votes
2answers
234 views

Blocking ports with iptables

I have a server with multiple interfaces (IPs). I'd like to block all ports on one of the IPs (I don't want to change anything for other IPs/interfaces), but allow outgoing connections from it. For ...
1
vote
0answers
245 views

Can ipmasq and ufw be used together?

If both ufw and ipmasq manipulate iptables, can I use ipmasq for a quick easy setup and then use ufw afterwards to add security or will the two just trample all over the iptables "stuff"? I'm playing ...
1
vote
1answer
463 views

iptables drop fake ip packets

I'm trying to drop all packets from the internet that use a fake ip address so they appear to come locally. Do I need both lines or only the first ? --append INPUT ! --in-interface lo --source ...
1
vote
2answers
391 views

iptables rules revert on Ubuntu

I'm using iptables on Ubuntu 10.04 and whenever I set iptables rules they will revert after a while. I set them with iptables -I INPUT or iptables -D INPUT and they work immediately and I see them in ...
5
votes
1answer
3k views

Disable or block outgoing email

To do web site testing, how can I disable or block the Centos server to not send out emails. Now, if I run in command line mail xxx@gmail.com I can send out emails. This is not good for website ...