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
2answers
3k views

iptables gives me the error “can't initialize iptables NAT”

I am trying to use iptables and it is giving me the following error root@vikkyhacks:~# iptables -t NAT -L iptables v1.4.18: can't initialize iptables table `NAT': Table does not exist (do you need to ...
2
votes
1answer
4k views

How to allow FORWARDing with firewalld on a Fedora 19 router

I've just installed Fedora 19 and I'm using firewalld instead of iptables, but I'm having difficulty interpretting the new terminology. I have 2 NICs. One is specificed ZONE="internal" and the other ...
2
votes
1answer
190 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 ...
2
votes
1answer
54 views

Help with iptables

I recently installed Oracle Linux 6 on a home server, and I've been having trouble with allowing ports past the firewall (iptables). I've tried adding ports with the command iptables -I INPUT -p tcp ...
2
votes
1answer
1k views

Nginx works on my linux machine but is not accessible from other computers in my local network

In my LAN network I have a server with Scientific Linux (RedHat or Fedora based distro), I've done yum install nginx but the welcome page is not accessible from other computers in my network. When I ...
2
votes
1answer
200 views

Allow shell access for key holders OR password login for whitelisted IP addresses

As a first line of defense against brute-force attacks, I've restricted SSH login attempts with TCP wrappers (denying access by default, and maintaining an IP whitelist in /etc/hosts.allow). However, ...
2
votes
2answers
1k views

How to route the incoming connections through a specific interface?

I have multiple ethernet cards with two different set of networks configured on them. The output of route -n is given here:: Kernel IP routing table Destination Gateway Genmask ...
2
votes
4answers
9k views

iptables: Allow only HTTP access for web browsing

Have a linux box, want it locked down but just be able to surf internet on it. Why is this script blocking http too? #!/bin/sh # # iptables -F # #Set default policies for INPUT, FORWARD and OUTPUT ...
2
votes
2answers
789 views

Iptables port mapping from two PCs to one

We have 3 PCs, two of it are connected to internet (both of it have 2 NIC) PC1: eth0 - 1.0.0.1 (external IP) eth1 - 172.16.0.1 (internal IP) PC2: eth0 - 1.0.0.2 (external IP) eth1 - 172.16.0.2 ...
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 ...
2
votes
1answer
1k views

iptables equivalent in windows-xp,win7?

I want to do port forwarding in win7,what's the iptables equivalent in win7?
2
votes
2answers
286 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 ...
2
votes
1answer
16 views

Cannot retrieve http sites when using OpenVPN, but https sites work just fine. Why?

I am using a VPN provider that uses OpenVPN. I don´t wont any other traffic leave my computer so I have set up my iptables like this: iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P ...
2
votes
1answer
580 views

How to transparently tunnel a port from IPv4 to a remote IPv6 device?

At home, I am connected with an IPv6 address and additionally, my provider provides a NAT-like setup through which I receive a public IPv4 address that I share with other customers (the reason being ...
2
votes
2answers
559 views

Connecting to an SSH server behind a NAT

I am having trouble connecting to an SSH server behind a NAT on an ubuntu workstation. I've installed openssh package(both the client and the server) and forwarded port 22 through the NAT and tried to ...
2
votes
2answers
3k views

Iptables redirect to localhost?

Suppose I have a network with a server routing all connections from inside the network to the Internet. How can I set up iptables so that instead of routing incoming connections to the Internet, it ...
2
votes
1answer
1k views

Bandwidth limit by Port on iptables

What iptables function would I use to bandwidth-limit all traffic on port 566 to 2KB/s? I'm confused about exactly how to do this.
2
votes
2answers
2k views

what does “-m tcp” mean in this iptables rule?

Firewall configuration written by system-config-firewall -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
2
votes
2answers
357 views

How to send out some traffic via my vpn connection

I had a working setup where I could access all my work resources which are accessed via VPN going via my server previously however at some point recently this stopped working for no obvious reason. ...
2
votes
2answers
2k views

OSX: Mimic Ubuntu IP Masquerading via iptables with ipfw

Good day, I am attempting to replicate a setup I have between a router and an Ubuntu PC, and have the same setup working on my MacBook (10.6, Snow Leopard). First, I have a router that has a USB ...
2
votes
1answer
375 views

Different routing rules for a particular user using firewall mark and ip rule

Running Ubuntu 12.10 on amd64. I'm trying to set up different routing rules for a particular user. I understand that the right way to do this is to create a firewall rule that marks the packets for ...
2
votes
1answer
1k views

How to block access to a website on Lucid Lynx?

I am trying to block a few websites on a lucid lynx, I tried editing /etc/hosts and that blocks access via url but the site still open if I enter the ip on the browser, how can I block ip access also? ...
2
votes
5answers
12k 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 ...
2
votes
1answer
799 views

IPTables module ip_tables not found for root

We got a custom build Linux distribution from a vendor, which is not shipped with iptables enabled. root@xxxx:~# iptables -L modprobe: FATAL: Module ip_tables not found. iptables v1.4.21: can't ...
2
votes
1answer
44 views

When writing an iptables save file by hand, how does one calculate the packet-counter and byte-counter values?

I am attempting to write a 22MB iptables rule-set file, the very kind that is generated with the iptables-save command, except endlessly long. Understandably, this takes a prohibitive amount of time. ...
2
votes
1answer
129 views

Traffic not being forwarded through NAT

I have a router which provides internet access using NAT, and a client Linux box (A) which is connected to this router on eth0. This Linux box also has a wlan interface, wlan0; what I would like is ...
2
votes
2answers
4k views

How to route specific traffic through OpenVPN?

I'm running a server at home with rtorrent and apache2. I would like to route my rtorrent traffic via OpenVPN and since im kinda new to OpenVPN and iptables i would like to have a user friendly guide. ...
2
votes
2answers
398 views

Force certain applications to use VPN

For a few days now, I've been trying to force only certain applications to use a VPN. I've thus far found it pretty simple to either force all applications to use it, or no applications to use it. ...
2
votes
1answer
4k views

how to open ports for localhost on linux?

I've been reading for the past hour about opening ports on Ubuntu 12.04 and I can't seem to get anything to work. I'm running a program with an RPC server accepting local connections on localhost ...
2
votes
1answer
623 views

IPTables - unknown error 4294967295

I've moved an old Slackware 11 installation from a physical PC to a virtualized in ESXi. Everything seems to work fine except for one rule in iptables, namely the row: iptables -t filter -I INPUT -m ...
2
votes
1answer
796 views

How to route specific traffic through OpenVPN?

I'm running a server at home with rtorrent and apache2. I would like to route my rtorrent traffic via OpenVPN and since im kinda new to OpenVPN and iptables i would like to have a user friendly guide. ...
2
votes
1answer
2k views

Port forwarding with IPTABLES and VBox

I have a small problem with getting a proper configuration of iptables under Ubuntu. But before, let me describe the network configuration: I am using xDSL line terminated with modem+router+DHCP ...
2
votes
1answer
484 views

Save iptables when iptables-save doesn't exist?

I'm working on a Soekris net4801 that is running an unknown distro of Linux. The kernel is 2.4.29, and iptables is v1.3.4. I can't work out how to save the iptables. I searched the whole system for ...
2
votes
3answers
3k views

How to install firewall script in Ubuntu?

https://help.ubuntu.com/community/Router/Firewall In the link above there is a firewall script described. How can I install this script in Ubuntu 10.0.4 desktop?
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? ...
2
votes
0answers
11 views

How to set up a hotspot with socks5 proxy

I have a laptop with linux installed on it. The laptop has two network interfaces: eth0 and wlan0. Normally I surf the Internet through eth0, and I've successfully set up a hotspot in linux for my ...
2
votes
0answers
42 views

Modify incoming packets before forwarding in Linux

I’m using a Linux (Debian based) system on which IP forwarding is enabled (/proc/sys/net/ipv4/ip_forward is set to 1). I can read the incoming packets using a raw sockets program, but I want to modify ...
2
votes
1answer
64 views

Iptables redirecting

I have set up a Personal hotspot using Hostapd. But this hotspot is not connected to the internet but I do have Apache installed on it. What I am trying to achieve is to redirect all the clients (that ...
2
votes
1answer
30 views

How to apply ipfw rules to domains that resolves to multiple IPs?

Suppose I wanted to use ipfw to throttle uploads to youtube. The uploads are made to upload.youtube.com but this domain resolves into multiple different IPs (which also appear to change over time). ...
2
votes
1answer
75 views

IPSet with IP6Tables ERROR

Can someone please solve my headache and tell me how to fix this? [root@www ~]# ip6tables -I INPUT -m set --match-set blacklist6 src -J DROP ip6tables v1.4.7: Couldn't load match ...
2
votes
0answers
153 views

Block all outgoing traffic for a User running Wine apps

Good day, I'm using a lot of WINE apps under Linux which work just fine, but one thing I am specifically looking for right now is to block their access to the internet (outgoing), with exception of ...
2
votes
3answers
2k views

Limit incoming connections using iptables per IP

I need to limit access to some port per IP. Let's say 5 connections per minute - not more. I've seen iptables recent, connlimit and limit, but all of them are not fitting exactly what I need. ...
2
votes
0answers
86 views

Iptables error :libipt_cgroup.so doesn't exist while using net_cls.classid in net_cls cgroup subsystem

In kernel document doc/cgroup/net_cls.txt, it introduces the function of net_cls.classid, and show an example of netfilter (iptables) using this tag to perform actions. the command of iptables is: ...
2
votes
1answer
435 views

How to forward ports through ssh and nat to another machine

I have a problem when using ssh port forwarding and nat simoultaneously. Situation: Machine A runs a webserver on port 8080 Machine B is a raspberry pi which works like a little router. It has two ...
2
votes
0answers
78 views

Determine if an uplink interface is usable

I have a firewall system that is served by two uplinks to different ISPs. I'm using shorewall to manage the firewall; it load-balances traffic over both interfaces with connection tracking. All that ...
2
votes
1answer
167 views

How does uTorrent can automatically forward port through Linux Net Filter based firewall?

I have dilemma: How it is possible that uTorrent shows on my internal machine with internal IP, that my connection is OK (green check in the bottom right of its window), while I never forwarded any ...
2
votes
1answer
383 views

CONNMARK on rewritten packets

I have a host, on which I rewrite saddr and daddr of IP packets coming to it, this is done by the program, employing libnetfilter_queue. Basically it acts like proxy. For example, the packet comes ...
2
votes
2answers
1k views

How can I port forward an LAN port to a WAN Ip with iptables?

Using iptables on my router (dd-wrt), I'd like to forward requests to the router on port 64738 from the LAN to an IP (192.168.10.14) on the WAN. This is the opposite of the norm (forwarding a request ...
2
votes
0answers
237 views

Limit bandwidth on HTTP downloads based on file size

Is there a way to limit lets say in iptables or any proxy solution/software if a user is downloading a filesize that is greater than lets say 20MB it will limit his entire download at 2KB/s? ...
2
votes
1answer
3k views

How to use NAT iptables rules for hostapd

My PC is equipped with two net interfaces - wlan0 and eth0. I want to use WiFi port as access point on wlan0. So i use hostapd facility and it works properly in routing mode in local network. Users ...