iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

2
votes
0answers
268 views

Iptables and Port Scanning and Recent module

I'm trying to write an adaptive firewall using iptables, and am not clear on how the recent module is working. For example, see http://blog.zioup.org/2008/iptables_recent/ Snippet from my iptables: ...
1
vote
2answers
200 views

IP packets have wrong source address

I have two 4g modems connecting to a network and sending and receiving data. There is a problem though, as the modems keep getting kicked off the network because the source IP address of the packets ...
0
votes
1answer
75 views

Undoing specific iptables ip/port restriction

Say I add the following iptables rules: iptables -A INPUT -p tcp -s localhost --dport 4444 -j ACCEPT iptables -A INPUT -p tcp --dport 4444 -j DROP This allows localhost to access port 4444 then ...
2
votes
1answer
532 views

Port Forwarding using iptables on Open-Mesh

A quick overview for those who are unfamiliar with Open-Mesh: The system uses small wireless access points that automagically build their own mesh network. As long as one of the access points is ...
1
vote
1answer
134 views

Redirecting all IP over USB traffic to a fixed address

I'ma bit of a network newbie, so apologies for the inaccurate vocabulary. Say I have a device connected by IP over USB to my computer (running Ubuntu), that connects to 10.0.0.1. I configured my ...
2
votes
2answers
3k views

Debugging iptables using live packet views

Are there any CLI or GUI functions that I can use to monitor hits to iptables and watch as packets interact with iptables?
4
votes
2answers
6k views

How can I redirect outbound traffic to port 80 using iptables locally?

I'm trying to locally redirect ports on my Ubuntu machine using iptables. Similar to transparent proxying. I want to catch anything trying to leave my system on port 80 and redirect it to a remote ...
2
votes
1answer
163 views

LAMP Hardening, Transparent Proxy with iptables

I'm running a LAMP server with FTP(S) and several users. The users have only access to uploading PHP files and other web content. Some are running Drupal and Wordpress, but also a few home made stuff. ...
1
vote
1answer
199 views

Intercept incoming TCP/IP packets on Linux and perform NAT

I want to make a decision of what computer is behind the firewall sending the packet. Imagine I have 2 PCs behind the firewall and I want to, based on (my algorithm), make a decision at the firewall ...
1
vote
2answers
290 views

iptables: what the difference between filter and mangle

I am using iptables to to mark the package and want to route based on the marks. First I added the ip rule: sudo ip rule add fwmark 1 prohibit (The "prohibit" is just for test, I will change it ...
0
votes
1answer
234 views

Allowing a domain name in my IP Tables

I have a Linux server that gets a time offset for some strange reason. I set up cron job to run and update the time using the following command: /usr/sbin/ntpdate pool.ntp.org The problem is the ...
-1
votes
1answer
232 views

I can't access my computer through specific port?

On Fedora I tried to access port 1521, so I opened the following port on my firewall: $ sudo iptables -I INPUT -i eth0 -p tcp -m tcp --dport 1521 -j ACCEPT $ sudo service iptables save I then tried ...
2
votes
1answer
310 views

iptables string not dropping packet from tcp streams while using conntrack and string

I'm facing an unusual issue where specific TCP steams are not getting dropped by iptables; instead it's like iptables is just removing those specific packets. We're getting the following traffic: ...
1
vote
2answers
802 views

Missing iptables file on directory /etc/init.d/ (Fedora 17)

Is the iptables file in Fedora 17 moved from /etc/init.d/ to /etc/sysconfig/? I need do some patching to the iptables file to solve the firewall problem (Setting chains to policy ACCEPT: security raw ...
1
vote
1answer
239 views

port forwarding to internal lan server

I've ppp0 --> eth1 and eth0 (internal lan). I need forwarding externel 10022 port to port 8999 of the server 192.168.1.254 iptables -t nat -A PREROUTING -p tcp -i ppp0 --dport 10022 -j DNAT --to ...
3
votes
1answer
1k views

iptables: how to allow traffic from redirected port

I have a web service running on debian 7 and listening on port 8080. I want to redirect 80 to 8080 for inbound connections and allow only port 80. Here is my iptables configuration: root@localhost:~# ...
1
vote
1answer
297 views

What does the route Dest: 123.123.123.123, GW: 0.0.0.0 mean?

I have a route table: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 123.123.123.123 0.0.0.0 255.255.255.255 UH 0 0 0 ...
3
votes
2answers
1k views

What is the tun network interface for?

I noticed when running ifconfig that there is a network interface called tun0 and it has an ipv4 address. A bit of research shows that it is a tunneling device, but I don't really know how it's used, ...
1
vote
1answer
870 views

Copy/Mirror traffic to WAN interfaces without “iptables tee” support

I want to copy every outgoing packet to other WAN interfaces but my iptables (v1.2.7) doesn't have TEE target support. I wonder if there is another way (maybe using iproute2 or ebtables) to copy every ...
2
votes
1answer
2k views

How to setup iptables rules to allow skype

Here are my iptables rules to allow Squid to connect to a web server: # Accept internally-requested input iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #http,https traffic only ...
2
votes
5answers
156 views

Difficulty setting up iptables

I'm very new to *nix operating systems, and I'm having some trouble which I believe is because of misconfiguration of the iptables firewall. My server has SSH running on port 22, and server software ...
1
vote
2answers
665 views

SSH tunneling through a busybox router

I have a busybox router and I'm able to login to the console using telnet & I also have access to the web interface. My question is, how can I create an ssh tunnel from my local network through ...
1
vote
1answer
660 views

How to log iptables as of kernel 3.9.0?

What is the right way to log iptables as of kernel 3.9.0? I can no longer append a logging rule such as: # iptables --new-chain droplog # iptables --append droplog --jump LOG --log-level info ...
2
votes
2answers
1k views

Why must loopback traffic be authorized using iptables to get web access?

I thought the following was necessary was necessary for outgoing HTTP on a desktop (non-server): iptables -A INPUT -p tcp -m multiport --sports 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT ...
2
votes
1answer
383 views

IPTables string match redirection

The issue: I am currently redirecting port 80 requests to another system on port 1000. This is done like so: iptables -t nat -A PREROUTING ! -s 172.20.1.2 -p tcp --dport 80 -j DNAT --to-destination ...
1
vote
1answer
126 views

How to relay packet in a wireless ad hoc network?

I am trying to connect several Linux computers in wireless ad-hoc multicast : -computer C1 (192.168.1.3) -computer C2 (192.168.1.5) -computer C3 (192.168.1.6) C1 can not reach C3 On computer C1, ...
2
votes
1answer
2k views

Log the dropped packets by IPTables only if its DROPPED by a specific rule

I have IPTables rules set on a Linux device. I have a particular rule to drop the packets, and I wish to log the packets only if they're dropped by that specific rule, and not by the other rules. ...
2
votes
0answers
282 views

TPROXY for redirecting UDP on arbitrary ports

I want to intercept all UDP traffic leaving tap1. And possibly reply to e.g. DNS-requests. To accomplish this I wrote some python code listening to localhost and use iptables with a rule-set like ...
4
votes
2answers
165 views

Is it possible to set-up a VPN in such a way that I disconnect from the Internet if it goes down?

How can I set-up a VPN so I loose connection to the Internet if it goes down? I use Ubuntu and have used the network-dialog to use a VPN; but if the VPN goes down, it just switches to the non-VPN ...
1
vote
1answer
91 views

netfilter's configuration to allow openvpn

I've got a debian server at home, that I use to have a VPN access to my home computers. I've redirected the openvpn port on the port 2000 : in my file "server.conf", I've added this : #Server mode ...
3
votes
2answers
749 views

Open and redirect port

I'm trying to set up SNMP for a router so I can monitor it from an existing Nagios installation on an off-site server. I'm having trouble getting the router to respond to SNMP requests from the WAN, ...
0
votes
1answer
137 views

IP Address inaccesible

My Linux machine is inaccessible by the IP address, as in only http://127.0.0.1:8080/projectname or localhost works on the browser, but http://10.1.5.5:8080/projectname doess not (here ...
1
vote
1answer
666 views

How does iptables MASQUERADE work on the incoming side?

I'm still reading the iptables manual page and other documents and digging around questions and their answers. This is the problem which arises. When we setup the NAT we use a POSTROUTING rule such ...
0
votes
5answers
2k views

SSH login attempts per minute per IP

How can i limit SSH login attempts per minute per IP ? I want to disable login attempts during 5 seconds after a failure. Is this possible ? I'm not talking about ban a user after parsing logs like ...
3
votes
1answer
110 views

What are the requierements to sniff UDP packets in a Wireless Ad-Hoc network?

In a wireless Ad-Hoc network, I have two computers which communicates in UDP together from 192.168.1.3 to 192.168.1.5 I have a third computer (192.168.1.6) which wants to listen to the packets which ...
2
votes
1answer
725 views

iptables rules too restrictive; Drupal webserver cannot access repositories, ntp or even websites

This is a Drupal website running Ubuntu 12.04 LTS on Linode. Someone recently changed our iptables rules and a number of problems started. These include: Our Mollom spam protection is not working ...
5
votes
3answers
2k views

Transform an UDP unicast packet into broadcast?

We need to wake-up some computers on our internal LAN, from the Internet. We have a somewhat closed router. Very few ways to configure it. I'd like to use netfilter (iptables) to do this because it ...
0
votes
1answer
150 views

Iptable rule to ssh over the internet

I've a server abc.example.com and a remote desktop zzz.example.com. I'm using SSH over a custom port, say, 6789. Whenever my firewall is off, I'm able to connect to the server successfully. But, as ...
4
votes
1answer
6k views

IPTables - Port to another ip & port (from the inside)

I currently have a NAS box running under port 80. To access the NAS from the outside, I mapped the port 8080 to port 80 on the NAS as follow: iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT ...
2
votes
1answer
295 views

Can iptables be used to convert a single-homed host into a NAT server?

Given: I have a machine (HostA) with only one NIC which has Internet connectivity. I have another machine (HostB) with one NIC on the same switch. HostB is not configured for Internet access yet. ...
4
votes
1answer
2k views

iptables: recent module

I am using the "recent" module to prevent port scanning, such as: -A INPUT -i eth0 -m recent --name PORTSCAN --update --seconds 60 -j DROP -A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT ...
1
vote
1answer
965 views

How do I port-forward 169.254.169.254-bound packets from libvirt/KVM guests to localhost?

This is a followup to What's the best way to have a 169.254.169.254 address local to my laptop?. Short story: 169.254.169.254 is the "well known" address of cloud metadata services for EC2 and for ...
3
votes
2answers
5k views

Where is iptables script stored on DD-WRT filesystem?

I have an ASUS RT-N16 router that I've flashed with the open-source DD-WRT firmware. According to my ssh login, I'm running: DD-WRT v24-sp2 mega (c) 2010 NewMedia-NET GmbH Release: 08/07/10 (SVN ...
1
vote
0answers
67 views

Firewalld SELinux

Is there any way to better explanation firewall-cmd than the one given in Fedora18 wiki. I am trying to convert iptables to FirewallD in cmd line without GUI but cannot find a decent example or ...
1
vote
1answer
638 views

How do I route different users over different OpenVPN tunnels in Linux?

The setup: I have multiple, static-key OpenVPN client/server configurations, labeled "client1", "client2", and "client3" with server/client IPs 10.10.1.1/10.10.1.2, 10.10.2.1/10.10.2.2, and ...
2
votes
1answer
989 views

Local port forwarding automatically configured on boot?

I have software which needs to run as a non-root user, but needs to listen on port 80 and 443. With iptables, this isn't all that difficult: sudo iptables -t nat -A PREROUTING -i eth0 -p tcp ...
1
vote
2answers
201 views

iptables and logs

Suppose I add an IP to iptables blocking for exim, dovecot and FTP and this IP visits my server again. Is there any log of this visit so I can confirm the IP was trying to reach the server again but ...
3
votes
1answer
1k views

I opened a port with iptables but still doesnt work

I have a CentOS installation as a guest VM with VirtualBox. I have two ethernet interfaces, eth0 with NAT and DHCP, and eth1 with Host-only adaptor and static IP. I have oracle installed in this ...
2
votes
2answers
661 views

Iptables port forwarding to qemu vm

Is it possible to create an IPtables rule that forwards all incoming traffic on port 80 on the host to port 80 of the qemu VM? Is such a scenario possible with qemu?
2
votes
1answer
196 views

Explanation of bandwidth management script calling tc

I have some scripts in Linux to manage internet bandwidth, but I do not understand what they do. What is the meaning of the following scripts: tc qdisc add dev $IF root handle 1: htb default 256 tc ...