iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

4
votes
1answer
456 views

Why is my computer trying to send ICMP type 3 to OpenDNS?

In my firewall logs I see lots of entries like this. IN= OUT=eth0 SRC=192.168.1.105 DST=208.67.220.220 LEN=148 TOS=0x00 PREC=0xC0 TTL=64 ID=55705 PROTO=ICMP TYPE=3 CODE=3 [SRC=208.67.220.220 ...
8
votes
2answers
20k views

Iptables to allow incoming FTP

i want to allow incoming FTP traffic. CentOS 5.4: This is my /etc/sysconfig/iptables file. # Generated by iptables-save v1.3.5 on Thu Oct 3 21:23:07 2013 *filter :INPUT ACCEPT [0:0] :FORWARD ...
1
vote
1answer
1k views

iptables redirect FORWARD http traffic to privorxy port

Ideally i m trying to use my laptop and a 3Gphone as a WiFi router to redirect FORWARD HTTP but not HTTPS Traffic to privoxy which then forwards the traffic via a SSH tunnel to a ziproxy VPS. for the ...
4
votes
1answer
66 views

Is there any difference between these two configuration options?

Is there any actual difference between iptables -P FORWARD DROP and net.ipv4.ip_forward = 0 ? I know that one is a firewall command while the other one is a kernel option. But: I don't know ...
1
vote
0answers
137 views

Firewall config prevents hibernate connecting to postgres in CentOS6.3

I have an operating environment in CentOS 6.3 that has tomcat7 and postgres9.2 installed. There is just one web application deployed in tomcat that tries to establish a connection from localhost to ...
2
votes
1answer
153 views

What are the pros and cons to editing iptables configuration file vs adding rules via the iptables command

I am working with a product on CentOS that occasionally needs to automatically add and remove rules from the iptables configuration. For example, during an update, we want to explicitly refuse ...
1
vote
1answer
280 views

how to investigate Firewall blocked outbound TCP

CentOS webserver with CSF (Config Server Firewall) running. Blocking all outbound / Inbound traffic except listed ports 80 81 22 21 etc. for web, mail & FTP services etc. I'm use to seeing heaps ...
2
votes
1answer
146 views

Lost connectivity after iptables change

I attempted to add a couple web ports to iptables and in doing so lost the ability to resolve any external address. I have a working SSH session open and can get to the box easily if needed. Here's ...
2
votes
2answers
2k views

Open a port in my CentOS

I'm trying top open a port on my CentOS machine: I edit the /etc/sysconfig/iptables file and add my rule: -A INPUT -p TCP -m state --state NEW -m tcp --dport 143 -j ACCEPT Then I restart the ...
1
vote
0answers
277 views

iptables one IP through another network interface

This question is very similar to what I am trying to do: iptables --set-mark - Route diferent ports through different interfaces However I attempted to follow the answer but I was unable to make it ...
2
votes
1answer
130 views

Mark packets between machines (client and router)?

Can I mark a packet on the client's OUTPUT chain and add an iproute policy on the router to route them via a specific gateway? This what I tried to do, but it isn't working. My client's mangle table ...
4
votes
2answers
1k views

iptables port forwarding

I have a CentOS server with Java/J2EE(Tomcat) installed on TCP port 8080. I have two interfaces, eth0 and lo. I need to forward all incoming connection on TCP port 80 to 8080. I tried doing the ...
0
votes
2answers
252 views

Isolate a hosts networking with iptables

I want to isolate a host on my home intranet using iptables on my linux router. So say for instance, I have a host that has the IP of 10.0.1.50 and I want it to be able to talk to the rest of the ...
2
votes
1answer
53 views

How would I go about making this IPTABLE rule for every ip and not just one?

iptables -I PREROUTING -t nat -p udp -s 192.168.0.62 --dport 53 -j DNAT --to-destination 23.21.182.24 Instead of 192.168.0.62 I'd like to set that as a global rule, EVERY ip that needs dns should ...
4
votes
1answer
2k views

How can I redirect all traffic except local through external proxy with iptables in dd-wrt?

I have a router with dd-wrt. I have a firewall running to direct all traffic through an external proxy. It works great except that it also redirects local Ips and my proxy does not allow Ips, so I can ...
4
votes
1answer
90 views

iptables change log

Somehow an iptables rule was added to one of my systems. Does (or can) iptables keep a log about when and (maybe) who made a rule change? If iptables itself can't, is there a wrapper that might do ...
2
votes
0answers
221 views

SNAT problem in iptables

I am trying to reroute traffic from specific devices in my house over openvpn. For this, I've created an OpenVPN tunnel between my house wifi router and my server. Here is my setup: Wifi router's ...
1
vote
3answers
2k views

How to change user agent on all http requests made from my machine with Squid intercepting proxy?

I'd like to change the user agent on all HTTP requests made from this machine. It's easy enough to change the user agent in each browser, but other apps also make http requests. In particular, there's ...
2
votes
0answers
173 views

IPTables dropping UDP packet stream

I have a configuration where UDP packets containing encapsulated DNS data are sent to a KVM instance for processing. The KVM instance sits behind an IPtables firewall which is also doing NAT. The ...
3
votes
1answer
303 views

IPtables : Limit number of new ssh connections per minute

I need to ensure on my server that maximum new ssh connections per minute are not more then 5. sudo /sbin/iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 5 -j REJECT Above ...
5
votes
4answers
4k views

Help configuring a custom log file for iptables

I'm trying to log dropped packages to a custom file instead of /var/log/messages. To achieve this, I have added these two lines at the end of my configuration file: -A INPUT -m limit --limit ...
2
votes
1answer
498 views

Why iptables does not fetch information from /etc/sysconfig/iptables on centOs?

I'm new in Linux and encountered with problem with iptables. Here is content of /etc/sysconfig/iptables file # Generated by iptables-save v1.4.7 on Tue Nov 27 21:41:04 2012 *filter :INPUT ACCEPT ...
1
vote
2answers
218 views

Saving iptables on CentOS, and merging the previous rules with the newly saved ones?

I added some new rules using iptables command, then saved them using /sbin/service iptables save as described here: http://www.centos.org/docs/4/html/rhel-rg-en-4/s1-iptables-saving.html After ...
1
vote
0answers
131 views

SNAT with network alias IP RHEL 5.5

I have Rehat Enterprise Linux Server Release 5.5(Tikanga) with two interfaces as below eth0: with public IP as xxx.xx.64.118 eth0:0: with public IP as xxx.xx.116.19 eth1: with private IP as ...
2
votes
1answer
2k views

Set up firwall with iptables to only allow VPN

Im using IPredator VPN with openVPN and I want to make sure that if the connection is dropped, i wont submit data from the internet without the VPN. I heard that I could do that with iptables and a ...
1
vote
1answer
45 views

IPTABLES chain need help for restriction

I have two network cards eth0:- 172.16.91.70 (External Zone) eth1:- 172.16.85.70 (Internal Zone) I have clients in my Internal Zone which can access the external network. The ping goes fine and can ...
8
votes
1answer
3k views

Linux as router with multiple internet providers

Linux as router: I have 3 Internet providers, each with its own modem. Provider1, which is gateway address 192.168.1.1 Connected to linux router eth1/192.168.1.2 Provider2, gateway address ...
2
votes
0answers
276 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
215 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
80 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
595 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
138 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
4k 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
7k 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
168 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
209 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
336 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
240 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
253 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
318 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
875 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
266 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
2k 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
324 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
915 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
3k 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
158 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
763 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
686 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 ...