iptables is the userspace command line program used to configure the Linux 2.4.x and 2.6.x IPv4 packet filtering ruleset. It is targeted towards system administrators. Please, when asking a question about iptables, add the output from the following command: iptables -L -v -n

learn more… | top users | synonyms (1)

0
votes
0answers
241 views

How can I redirect/forward all the UDP/TCP traffic on one interface to another interface in OpenWrt

I am new to networking and I have a measurement device (D) that periodically sends all its readings over few UDP multicast sockets (with different multicast IP addresses and different port numbers). ...
0
votes
0answers
226 views

Socksify TCP connections reaching a gateway IP — preferably without iptables

I have Virtualbox installed on Debian with a few virtual machines. I can't install anything in the guests, and I use host only networking, vboxnet0. The host IP in the host network is 192.168.56.1, ...
0
votes
0answers
107 views

Tee udp to multiple destinations - preserve source IP address

On a RedHat host I will be using for routing, here are my needs: duplicate inbound udp packets to multiple outbound (>2) addresses outbound addresses may be unicast or multicast addresses outbound ...
0
votes
0answers
493 views

iptables/netfilter (nf_ct_ftp) drops ftp packets

I have a strange problem. netfilter (the module nf_ct_ftp) drops packet from one of my ftp client. But it happens only with this client (91.xxx.xxx.170), all others clients (about 100) are working ...
0
votes
0answers
91 views

Block VPN devices when VPN is down, but still allow non-VPN

I'm running DD-WRT on x86 hardware. OpenVPN is configured and connects to my VPN provider without issue. Here's what I'm trying to achieve: All devices on my network go through my DD-WRT router. ...
0
votes
0answers
94 views

Why does firehol generate an iptables ACCEPT rule on top?

Firehol generates iptables rules from a convenient configuration file. In my /etc/firehol/firehol.conf I have the following very simple configuration to allow incoming connections on http, https and ...
0
votes
0answers
160 views

NAT (MASQ) with vpnc daemon

I'm just setup vpnc daemon and setup tunnel, interface is up everything is OK. I'm try to share this tunnel for LAN using two files for iptables MASQ. First for starting up: cat ...
0
votes
0answers
225 views

OpenVPN on Ubuntu 12.04 - unable to connect to internet

I'm trying to use OpenVPN on my Ubuntu 12.04 web server, but as soon as OpenVPN is running, I can't connect to the internet. Befor starting OpenVPN, route says: Kernel IP routing table Destination ...
0
votes
0answers
37 views

Can IPtable be used to route the packets to a specific ipaddress

I have a server which has a iptables that maps all the incoming requests on port 443 to one of the configured process in round robin. The process to which request is routed via iptable , establishes ...
0
votes
0answers
103 views

Make local OpenVPN server show client's IP as localhost

I have an OpenVPN server, Tomcat and Jenkins server all running on the same DigitalOcean instance. I want to only be able to access Jenkins' web interface when I'm connected to the VPN. I can close ...
0
votes
0answers
575 views

Transparently redirecting http traffic to local proxy in bridge mode

Router - LinuxBridge - Backbone -- 10.0.0.0/8 , 10.20.0.0/16 test net | | |(eth1) --------> Management Interface 10.101.101.10 # brctl ...
0
votes
0answers
214 views

Squid SSL Protocol error

What is the issue of this error in Squid? (I Don't find anything in google) The system returned: (71) Protocol error The remote host or network may be down. Please try the request again. my ...
0
votes
0answers
41 views

Add iptable rule before networking starts on Ubuntu Server

I have a Ubuntu 10.10 server. I have an iptable rule that needs to get added before networking is started. How can I do that? I've tried this: ...
0
votes
0answers
66 views

iptable-save exported rule from another system doesn't get restored in new system

I built kernel and user parts of iptables 1.4.3.2 (to add layer 7). . I have another iptable 1.4.8 and I want to move rule from the system which is 1.4.8 to 1.4.3.2. I use iptables-save and ...
0
votes
0answers
93 views

KVM directly connect to guests without passing router

I have a KVM host running 5 virtual servers. Each virtual server is using a separate bridge interface, like br0, br1, br3... Each virtual server has a own public IP. Now, I would like to be able to ...
0
votes
0answers
187 views

using iptables to secure asterisk

Following the post at http://www.dslreports.com/forum/r26964868- I created some IP tables for my asterisk install. The server is behind a router and the router only had 5060 and the RTP ports ...
0
votes
0answers
105 views

how to use two squid proxy by iptables

I have two Linux machines with squid installed: 192.168.0.60:3128 and 192.168.0.70:3128. I want to setup a transparent proxy: 192.168.0.60:3128 to deal with http protocol 192.168.0.70:3128 to deal ...
0
votes
0answers
347 views

fail2ban is failing to ban apache IP pattern

I just noticed that fail2ban reports it 'banned' an IP address doing the following: 183.60.48.25 - - [03/Jul/2013:10:14:26 -0700] "GET http://www.baidu.com/ HTTP/1.1" 200 5112 183.60.48.25 - - ...
0
votes
0answers
124 views

How to allow only a country on APF

How I can block all countries and just allow connections from IPs from Brazil to my server using APF? I've searched some ways but none are using APF at all. Some of them make me download a huge list, ...
0
votes
0answers
972 views

FTP not listing files behind firewall (setsockopt (ignored): Permission denied)

We are developing a Magento application that has a module that works with FTP. Today we deployed this on the testing environment which is setup in the following way: Gateway server which has the ...
0
votes
0answers
117 views

Open port and route incoming traffic back to the connected client - OpenVPN

I did my own VPN setup on a CentOS box and it's working very nice and smooth. However I would like to add a feature that I open a specified port on the box for the incoming traffic that should be ...
0
votes
0answers
111 views

Copy files from EC2 instance to remote dedicated server

I'm having trouble copying several very large sql dumps via SSH I used this command: /usr/bin/scp -P 2382 /ec2/path/file.sql root@$123.45.67.890:/remote/file/path/ And also /usr/bin/scp -P 2382 -i ...
0
votes
0answers
113 views

Why NATted packets have different source ip addresses?

I've got ubuntu box with nat. Here is the problem: root@office.redhelper.ru:~# tcpdump -i tap0 host 194.190.8.141 -n tcpdump: verbose output suppressed, use -v or -vv for full protocol decode ...
0
votes
0answers
230 views

Client can not access some HTTPS through Squeeze gateway

I have a gateway (+firewall +proxy) set up on a Squeeze box with 2 NICs. The problem is the client cannot see some of the HTTPS (for example they can go https://mail.google.com but not ...
0
votes
0answers
142 views

--utc option is not working in iptables

I am using iptables v1.4.7/8. I used the following command iptables -A INPUT -s 10.0.4.247 -m time --utc --datestart 2013-5-23T7 --datestop 2013-5-23T9 -j DROP my utc time date -u Thu May 23 ...
0
votes
0answers
137 views

Apache server reached MaxClients setting

I'm using Apache/2.2.15 (Unix) in CentOS release 6.3 (Final) 2.6.32-279.1.1.el6.x86_64. I have some HTTP requests from specific referer with diferrent ip adresses and i want to block these requests ...
0
votes
0answers
76 views

How to redirect a local port range to a guest VM using Linux?

I am trying to redirect connections made inside a linux host to a guest VM, say 192.168.122.158, for a certain port range, say 8000:8500, i.e.: telnet localhost 8000 should actually result in a ...
0
votes
0answers
40 views

how to open forwarded port (on remote server)

I have tunel from local router(dd-wrt) to external server: ssh -i /root/.ssh/id_rsa -f -N -R 221:${LOCALIP}:221 root@VPS-MACHINE Port 221 - ftp server. Now i can login to local ftp through ...
0
votes
0answers
251 views

How to filter out/disable DHCP NAK responses?

We have some crappy situation where we don't have control over the existing DHCP server on the network and where we need to add another BOOTP/DHCP server with the authoritative directive. Our ...
0
votes
0answers
188 views

Why doesn't this iptables unban command work?

my iptables chain looks like this: Chain DENYIN (1 references) num target prot opt source destination 1 DROP all -- 123.456.789.012 0.0.0.0/0 When I try to ...
0
votes
0answers
190 views

Fail2ban fails to parse logs, no error, no warning, no banning on CentOS

Using latest build (0.8.8) on CentOS i've setup fail2ban to filter Kerio spam/harvest attacks. Here's my kerio.conf [INCLUDES] before = common.conf [Definition] failregex = .*SMTP connection from ...
0
votes
0answers
132 views

Multihoming, NAT and ICMP

My router is the default gateway of a LAN and is multihomed. ISP2 is used for HTTP, HTTPS and ISP1, the default gateway of the default routing table, for the rest of the traffic. Similar questions ...
0
votes
0answers
59 views

OpenSwan issuing same IP

So I have finally got the authentication to work, and it will now connect, but when I go to use the connection I can't actually use the network. looking at the connections it seems to be issuing the ...
0
votes
0answers
167 views

SolusVM Slave - custom iptables

I want to add some custom lines to /etc/sysconfig/iptables. I can do this but Solusvm flushes the rules using iptables-save every 5 minutes. It does not always remove them and they survive a reboot ...
0
votes
0answers
244 views

Ubuntu 12.10: wvdial connection shared through NAT resets and reconnect with every packet request

I'm having this problem: I'm sharing my wvdial modem connection through NAT configuration with these commands: $ sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE $ sudo ...
0
votes
0answers
46 views

Some netfilter log messages are missing a log prefix

I added logging rules to all of netfilter's built-in chains using the following script: https://gist.github.com/anonymous/5330491 All logging rules get the correct --log-prefix argument (verified by ...
0
votes
0answers
96 views

CentOS 6.3 iptables IProtation

I want to setup IP rotation on CentOS 6.3 VPS. I've few IPs to play around. I've tried following iptable rules (which I got it from some other forum), but not much help. iptables -t nat -I ...
0
votes
0answers
50 views

Can't preroute port with IPTables

I'm having trouble prerouting port 2222 to the destination port 22. The other rules seems to work, but can't figure out why this rule doesn't. This is my iptable-config: # Generated by iptables-save ...
0
votes
0answers
141 views

iptables configuration to block unwanted traffic on specific MAC addresses

I want to block all Skype,Facetime, VOIP traffic on a MAC address. My approach is to block all ports from 450 to 65535 and this is my commandline: iptables -A INPUT -p tcp -destination-port 450:65535 ...
0
votes
0answers
73 views

How to portforward with iptables?

I currently installed openvpn on CentOS 6 64bit and everything is working fine but I want to portforward a client "user" so they can use that port. Here is what I thought it should work iptables -t ...
0
votes
0answers
131 views

set https forwarding with squid and iptables

I have a Linux as router, eth0 (192.168.0.60) connect to LAN, eth1 (10.100.33.239) connect to Internet. squid works well, I can set 10.100.33.239:3128 or 192.168.0.60:3128 as proxy in web browser and ...
0
votes
0answers
142 views

Iptables - limiting connections to port range

I want to limit connections to my server to one connection per second on every port in range 10000:65535 I started using this rule: iptables -A INPUT -p tcp --syn --dport 10000:65535 \ -m ...
0
votes
0answers
34 views

MUSH Server not responding on port 4201 - IPTables at fault?

I'm using a Ubuntu VPS with Fasthosts in the UK. I have a Drupal site on the box and just installed the PennMUSH server. If I telnet to localhost (port 4201) from the box itself, PennMUSH responds. ...
0
votes
0answers
135 views

CentOS mysql - cannot connect to the database remotely

I cannot connect to my VPS's MySQL databases remotely. The 3306 port is open. In /etc/my.cnf bind-address and skip-networking lines are deleted. And when I try to connect from a remote machine I ...
0
votes
0answers
608 views

Multiple Duplicate Lines when running iptables -L?

Specifically talking about an Ubuntu 10.04 LTS server (Lucid Lynx), although its probably applicable to other Linux versions. I was trawling through the logs for a few websites, doing some spring ...
0
votes
0answers
255 views

Incorrect iptables setting preventing server from returning data

I'm have a web server X, a transparent squid proxy server P and I'm using iptables to redirect all outgoing traffic on X to P, such that when a page on X is accessed, X will retrieve/curl a page Z and ...
0
votes
0answers
230 views

CentOS 5.7 issues with iptables

I'm trying to set up IPTables on a new CentOS server. This server will function as an FTP server that I need to be accessible from the outside, however, I want to lock down SSH to only accept internal ...
0
votes
0answers
204 views

Configuring two-way NAT with iptables

I am trying to configure NAT for my VPN connection. I have one NIC with 5 configured public IP addresses and I want to use one specific IP address for this NAT config. I have enabled the ipv4 ...
0
votes
0answers
55 views

conntrack output - reply values

Conntrack classifies a packet to a flow based on protocol no, srcip, destip, srcport, and destport. A sample output is shown below, [NEW] udp 17 30 src=192.168.2.100 dst=192.168.2.1 sport=57767 ...
0
votes
0answers
228 views

Exporting EC2 Security Groups to iptables

Is there a simple way (script or otherwise) to export amazon security groups' info into iptables format?