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

3
votes
1answer
1k views

Linux iptables forward from ip1:port1 to ip2:port2

I connect thought tunnel to other machine like this: ssh user@ip -L2000:192.168.64.88:80 So on my local machine I want to configure iptables that way like I have a "native" access to ...
3
votes
0answers
3k views

How do I configure DD-WRT to forward IPSec traffic to an internal server to support a road warrior configuration?

I use dd-wrt as my home router setup and that's been working fine. Now I wanted to figure out a way to be able to use my iPad to set up a IPSec tunnel to my home network while I'm on the road. PPTP ...
3
votes
2answers
4k views

Using iptables SNAT based on source interface and ip address

I would like to change source ip address according to ip address and interface it came in. Let's consider following example: ----------------------------- | | | ...
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 ...
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 ...
2
votes
2answers
6k 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
5k 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
408 views

What other ports should I block to maximize server security? PS using IPTABLES

I have blocked ports 80, 9001, 9080. What other ports should be blocked to maximize security? PS: It is a asterisk server / PBX Sorry: New Systems Admin here :) Thanks!
2
votes
4answers
10k 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
485 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 ...
2
votes
1answer
5k views

Using iptables to redirect ip address

I have the requirement on a Linux system where the Linux device is using RSYNC to sync data to another Linux machine. This is working fine at the moment, however I need to move one of the machines to ...
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 ...
2
votes
5answers
8k 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 ...
2
votes
1answer
61 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

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
3k 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
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
242 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
2answers
830 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
1answer
883 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
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
46 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
546 views

Combination of NAT, DHCP, and OpenVPN on lubuntu 14.04

Okay, so I've got a set up, where eth0 my internal IP address (192.168.1.3) it has been configured as my default gateway using the iptables this sudo sysctl -w net.ipv4.ip_forward=1 sudo ...
2
votes
2answers
690 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
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
397 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
1answer
1k views

What is command to look list of redirect rules, iptables

im using command like this : iptables -t nat -A PREROUTING -p tcp -d 192.168.1.118 --dport 4080 -j DNAT --to-destination 192.168.1.118:4088 My question what is command to look all rules in the ...
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
425 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
13k 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
8 views

Linux iptables DNAT on incoming packet without conntrack (stateless)

In my linux box 10.20.1.1, i got two UDP apps binded on port 46000 (App A) and 36000(App B) respectively. The apps communicate with two UDP servers bindeded as 10.10.1.1:36000 (Srv X) and ...
2
votes
2answers
2k views

Apache runs locally but can't be accessed from other machine

I'm running Apache 2.2.3 in a VM for a test environment on CentOS 5. Apache is running and responding to requests on the VM itself. If I run "lynx localhost" on the VM I do get my test page. When I ...
2
votes
1answer
56 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
162 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
5k 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
5k 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
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 ...
2
votes
1answer
702 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
870 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
3k 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
519 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
25 views

Allow only one website using iptables in a linux router

I have a Linux server I'm using as a router for my internal network. I need to block all the websites except one or two using iptables. How can I set this up?
2
votes
1answer
26 views

Man in the middle using iptables

I wish to test a subsystems which communicates with another subsystems via tcp. I have used the following: "iptables -A OUTPUT -p tcp --dport "+port_number" -j DROP" to stop the traffic on a port ...
2
votes
0answers
87 views

Routing traffic around VPN

I recently setup a OpenVPN client on my HTPC, however once I connected to the VPN server I was no longer able to remotely SSH or connect to the other servers I had running on the HTPC. I followed ...