iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
15 views

Curious about strange ICMP type 3 code 10 traffic to my IP address

My firewall (iptables) logs some strange ICMP type 3 code 10 traffic that I am curious to understand. Type 3 = Destination Unreachable Code 10 = Communication with Destination Host is ...
0
votes
0answers
15 views

Forward local port to remote port in a Vagrant machine

I have MySQL running on my local machine and I need to publish this port to a Vagrant box without any special SSH hackery. Is there a way for me to forward 10.0.2.2:3306 to 127.0.0.1:3306 on the ...
5
votes
2answers
502 views

How to ensure SSH port for example is only open to a specific IP address?

This is my /etc/sysconfig/iptables: it has two ports open 80 apache and 22 for ssh. # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. ...
1
vote
0answers
24 views

Redirect shared internet to tor/privoxy

I have shared my internet and set my client gateway to my IP, every thing works. I need to client goes through tor. I configured privoxy to use tor and with this iptable command I defined a rule: ...
2
votes
1answer
48 views

Unable to access website hosted on virtual machine

I'm on a mac (osx 10.9.3) running CentOS7 in virtualbox. I would like to access the website hosted on the virtual machine. Browsing to the Guest IP returns webpage not available. I'm able to ping and ...
2
votes
0answers
22 views

iptables hangs at applying rules

I have a set of rules that are supposed to give me the most protection before things like fail2ban and other things are added to the mix. The issue is that although everything checks out in the test, ...
0
votes
1answer
17 views

how to get effect of IP rules script in RHEL 6?

I have written one ip.sh file in that I have written one rule and then saved the iprules with the corresponding commands. Now when I opened /etc/sysconfig/iptables nothing is reflecting. I need the ...
1
vote
0answers
14 views

ISC DHCP Server - A Client's Uplink Is Not Working

Running a DHCP server, client(s) does not have up-link (0Mbps) and has a downlink (50Mbps.) I am setting up a gateway/router on a PC running Debian Wheezy with ISC-DHCP. I have 1 WAN (eth0) and 2 LAN ...
3
votes
0answers
62 views

iptables rule no actions on scapy packets

I wrote this rule to change all udp destination IP addresses to 8.8.8.8 when dport is 53: iptables -t nat -A OUTPUT -p udp -m udp --dport 53 -j DNAT --to-destination 8.8.8.8 The rule worked when ...
9
votes
2answers
481 views

( /etc/sysconfig/iptables ) “Manual customization of this file is not recommended.” Why?

Editing this file directly /etc/sysconfig/iptables can save me so much headaches so much time and so on... and yet on the very top of the file it says.. Manual customization of this file is not ...
0
votes
1answer
31 views

Is it OK to copy /etc/sysconfig/iptables to another machine?

This is my original server with very loose security given that it does not block all ports via iptables. /etc/sysconfig/iptables contents: # Generated by iptables-save v1.4.7 on Mon Jun 16 ...
-1
votes
1answer
40 views

/etc/sysconfig/iptables : how to block everything except for port 80 and 22?

My new centos 6.5 cloud server came with this /etc/sysconfig/iptables inside we have: # Generated by iptables-save v1.4.7 on Mon Jun 16 20:04:05 2014 *filter :INPUT ACCEPT [8:607] :FORWARD ACCEPT ...
0
votes
1answer
25 views

How to modify iptables rules via editing a file rather than interacting via command line?

In the history, i would simply edit a file and then reboot the whole server. i would clone the line that had port 22 open change it to 80 and then save the file.. and reboot the whole system so ...
2
votes
2answers
37 views

In iptables, what is the difference between targets DNAT and REDIRECT?

More specifically, is -A PREROUTING -i $INT -p $PROTO --dport $PORT -j REDIRECT --to-ports $NEWPORT equivalent to one or both of these? -A PREROUTING -i $INT -p $PROTO --dport $PORT -j DNAT ...
10
votes
3answers
201 views
+500

Iptables to redirect DNS lookup IP and Port

I have discovered that my ISP (verizon) is intercepting all DNS traffic on port 53. Using iptables, I want to redirect all DNS lookup traffic to a specific IP and Port (5353). Any attempt for my ...
2
votes
2answers
28 views

Iptables not forward traffic

I need to redirect all traffic incoming on port 9750 (the port chat server) to another machine on the same subnet. Ports clients - dynamic. iptables -t nat -A PREROUTING -p tcp -d x.x.x.a --dport ...
1
vote
2answers
46 views

Reject ssh connections made from proxies

I was seeing this question which was concerned with blocking access to the users who do not belong to a particular region. I am sure that blocking is possible but I see there is a workaround to this. ...
1
vote
0answers
36 views

DROP all for port 22 if not geoip set of US for iptables and xtables

I want to simply block all ssh access from anywhere but with in the US. This is my whole iptables, and I have followed ...
0
votes
0answers
22 views

iptables blocking email from my wordpress site

I cant seem to send email from my Wordpress site. Here is what my iptables script looks like. Ports 25 and 110 are commented but even uncommented the send email does not work. #!/bin/bash # A Linux ...
0
votes
0answers
11 views

Hammered by botnet; iptables can't keep up [migrated]

Fructis is a multi-site (and multi-software) VM (Xen) with 2 cores and like 6G of RAM. It hosts popular Drupal and Wordpress websites and is currently getting hammered. I will put all details below. ...
2
votes
3answers
63 views

What iptables command do I need to allow web server traffic?

I have a hard time understanding iptables rules. I am running a centos 6.5 VM on my laptop (vmware hypervisor) and it looks like it comes with this setup for iptables: # iptables -L Chain INPUT ...
2
votes
0answers
29 views

Transparent Proxy

I am setting up attempting to set up a transparent proxy on CentOS using Squid. So far I have managed to filter the content and get it working perfectly. The only issue I am having is getting a form ...
1
vote
0answers
18 views

Open ports for local samba server with iptables

I can't seem to connect from Windows 7 to my network share on Ubuntu (Samba). Why won't this work? Heres a bit of information, that would perhaps be useful. user1@computer:/etc$ sudo iptables -L ...
5
votes
1answer
43 views

forward outgoing traffic port using iptables

I am trying to forward all outgoing traffic from port 80 to port 8080 using iptables and I tried the following rule, though it did not work: iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT ...
1
vote
1answer
42 views

forwarding not working in iptables from 8006 to 443

My dedicated server was bridged to vmbr0 and it has 2 Ethernet cards eth0 and eth1 its bridged. I have enabled forwarding with net.ipv4.ip_forward=1. I want to redirect the Port 8006 to 443. Now ...
0
votes
2answers
30 views

iptables and securing an smtp

I am trying to block all SMTP out of my network, that is not from my internal mail server address. So i would just like to know if there could be anything i am missing or perhaps anything i could ...
8
votes
6answers
155 views

iptables rule adviser script

There is a server without any iptables defense: ACCEPT all.. There could be custom applications on this server. If we should need to harden this server (so deny all, and only let what is needed by ...
-1
votes
2answers
67 views

My Centos Server cannot resolve the DNS host name [closed]

My Server OS: Centos 6.3 x64. The server iptables is: *filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport ...
0
votes
1answer
31 views

Linux iptables DNAT 53306 to 127.0.0.1 3306

mysql real port is 3306。 I want public network using 53306 to visit mysql, and 3306 is not allowed access from public network. How to write the iptables rules DNAT 53306 to 127.0.0.1 3306?
0
votes
0answers
40 views

set rules for openvpn by iptables in firewall CentOS 6.2

Firewall (FW), three leg: eth0: 172.16.1.101 eth1: 192.168.99.99 (LAN) eth2: 10.0.0.1 (DMZ) I installed openvpn in FW by tunnel mode, already ok: tun0: 192.168.10.0/24. If I use shorewall and ...
1
vote
0answers
67 views

Error: iptables: No chain/target/match by that name

I am trying to configure proxy server on RHEL Server 6.5 using Squid and iptables. Below is the command I executed and the error message it displayed: vzlptest01 root [root] > iptables -A INPUT -i ...
1
vote
1answer
30 views

Bridged TAP interface to virtualbox

I need bridged TAP interface on client side of my VPN to virtual machine. I use VirtualBox 4.3.12. But in Adapter Network options in Attached to: Bridged adapter I do not see my TUN adapter. I have ...
2
votes
1answer
43 views

How do I enable IPv6 inbound traffic to get forwarded to my machine?

It seems that IPv6 traffic on my router is being dropped. How do I configure ip6tables appropriately, so that traffic is forwarded/accepted to my machine? Here's the syslog for my IPv6 traffic: Jun ...
1
vote
0answers
26 views

Packets sent through TUN interface not routed

I have a C program attached to a TUN interface. In my C program, I'm building packets and writing them to the TUN interface. Now to check if packets are really sent from my TUN interface I use ...
7
votes
3answers
122 views

Limit max connections per IP address and new connections per second with iptables

We have an Ubuntu 12.04 server with httpd on port 80 and we want to limit: the maximum connections per IP address to httpd to 10 the maximum new connections per second to httpd to 150 How can we ...
2
votes
1answer
29 views

My iptables works the opposite from what I wanted

I have this set of iptables rules ... $ sudo iptables -n -L Chain INPUT (policy ACCEPT) target prot opt source destination LOG all -- 0.0.0.0/0 0.0.0.0/0 ...
1
vote
1answer
57 views

Setting up a gateway between two subnets on the same physical network

I need to configure a DHCP-enabled network (192.168.2.) on a physical layer where resides an already existing network (192.168.1.) with static IPs. I have a Debian 7 server with two interfaces (server ...
2
votes
2answers
60 views

Temporary redirect ports

I need a temporary redirection of some ports to another machine. I've tried: iptables -t nat -A PREROUTING -p tcp --dport 4321 -j DNAT --to-destination 192.168.121.4:80 But shorewall blocks all ...
3
votes
0answers
25 views

Packets do not cross IP tables Postrouting when originating from an external IP

I'm trying to reflect traffic from the internet to an internal device that I only want to have local access. I have a host in my DMZ that I'm trying to DNAT traffic to this internal device, and SNAT ...
1
vote
0answers
46 views

How do I control ip routing in the new firewalld?

I have the following scenario: Our fedora server is connected to the internet on eth0 and has a second nic, wlan0 acting as an access point. The purpose of the access point is to provide a connection ...
1
vote
1answer
44 views

Iptables not forwarding. Input instead

I have set up iptables on my ubuntu headless server: iptables -S -P INPUT ACCEPT -P FORWARD DROP -P OUTPUT ACCEPT -A INPUT -s 10.1.3.90/32 -i eth0 -j LOG --log-prefix "INPUT: " -A INPUT -i eth1 -j ...
3
votes
1answer
62 views

What's the difference between ULOG and NFLog?

Various places suggest to use ULOG or NFLOG instead of LOG for getting dedicated netfilter logging (see for example here or here). From looking at man iptables those two look quite alike. Except that ...
1
vote
1answer
45 views

CentOS Traffic Filter

I am trying to use Squid to filter the traffic flowing through the network. I am also trying to make this system transparent. My network setup is like so: Router -> CentOS Machine -> The rest ...
0
votes
2answers
36 views

Is there a need for repeating rule parameters in iptables?

Let's say we need some ssh rules in iptables. But we also want to specify another chain for all the rules. We could use something like this: iptables -t filter -N ssh iptables -t filter -N tcp ...
1
vote
1answer
44 views

IPTables DNAT rule to local web server doesn't work with localhost?

I have linux box functioning as Wireless Access Point. Wireless clients connect and then browse the web. I am only allowing port 80. There are certain sites I'd like to block, but not by dropping the ...
1
vote
1answer
34 views

Configure NAT filtring behavior with iptables

I'm using this rule to configure SNAT: iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:4000 I want to specify a rule to filter out packets not destined to the internal ...
1
vote
1answer
53 views

Randomize external port when doing NAT with iptables

I want to configure a NAT behavior different from the default one implemented by iptables. In this example: iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:2000-400 The ...
4
votes
0answers
69 views

Why does my firewall (iptables) interfere in my bridge (brctl)?

I set up a bridge br0 "attached" to two interfaces: eth0, my physical interface connected to the real LAN, vnet0, a KVM virtual interface (connected to a Windows VM). And I have this single ...
1
vote
0answers
41 views

Local Client/Server communication using TUN interfaces

I want to establish a local communication between a client and a server using TUN interfaces. The client program will be attached to interface TUN1 and we suppose that it has IP address @IP1. The ...
5
votes
2answers
137 views

Why are some ports reported by nmap filtered and not the others?

I'm scanning a server which should have a pretty simple firewall using iptables: by default everything is DROPped besides RELATED and ESTABLISHED packets. The only type of NEW packets allowed are TCP ...