iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
7 views

Use iptables to redirect all traffic, IP and domain requests?

Context: With iptables, I redirect all the traffic - incoming at port 80 - to a distant server IP (X.X.X.X). IP That works a charm with IP (If I request 12.2.4.5, I fallback on X.X.X.X). Domain ...
3
votes
0answers
26 views
+100

forward all mysql traffic to a ssh tunnel

I have a local application that needs to connect to a remote mysql server at 40.40.40.40:3306 The main firewall blocks all connections but ssh, I can set up a ssh tunnel and connect to the server ...
2
votes
1answer
15 views

Per user routing on wifi

I'm using vpn but i want to have one user that could access network not through vpn but using my real ip address. The problem is that all solutions i found by quick google'ing, for example this ...
0
votes
1answer
30 views

iptables and ssh

I'm running Arch Linux and I have a running SSH daemon to access my machine when I'm out side my LAN. I can do the connection, but iptables keeps blocking SSH Daemon, so I can only connect if I turn ...
0
votes
1answer
13 views

iptables rules' weird behavior

I have a set of iptables rules (see below) whose purpose is to disallow traffic to go out of my machine when my VPN connection is abruptly lost or manually terminated: #!/bin/bash echo "Please wait ...
0
votes
0answers
6 views

RHEL 6 IPTables filtering of IPSEC protected Traffic

looking for some guidance to make sure I'm going in the right direction and maybe get some hints or gotcha's I need to be thinking about. I'm working on RHEL 6.4. I have a cluster of computers that ...
5
votes
0answers
34 views

Why doesn't NAT reserve ports from the machine's TCP and UDP port pool?

I made two experiments. This is the network for both of them: [private network] [public network] A -------------------- R ----------------- B 192.168.0.5 192.168.0.1|192.0.2.1 ...
0
votes
1answer
14 views

Default gateway is not reachable

I have a vmware player on which i have installed CentOS 6.5. And on that CentOS 6.5 i have installed lxc and on that lxc i have installed centos 6.3. I am using NAT and bridger as a Network adaptor ...
3
votes
1answer
27 views

Is it possible to reduce infomation in iptables log?

I noticed that there are data in the iptables log that I don't need, so I was wondering if it's possible to change some configuration so that the log has less information, reducing the log's size. ...
2
votes
1answer
49 views

Rewrite source IP in TCP replies using iptables

I'd like to rewrite the source IP on TCP/514 traffic leaving a redhat machine, for connections that weren't initiated from the machine. The machine receives TCP/514 traffic on an interface, for ...
0
votes
0answers
40 views

server1 ssh's to server2 but server2 sees server1 by it's private ip due to both servers being on the same firm/network

I ssh into server1 via it's public IP from server2. I then ask server1 what my IP is. i.e. server2's IP. It shows me server2's private IP. I want it to show me server2's public IP. If server2 was ...
0
votes
1answer
29 views

Apache VirtualHost redirect 302 (cyclic link)

I seek some wisdom, so please help... I have one VM acting as router/web server/dnsmasq server on IP: 192.168.100.1. And I have other machine acting as client. Server has IPTables rule to redirect ...
0
votes
1answer
77 views

iptables - how to drop protocols [closed]

I have the desktop-server Debian Jessie machine running for testing purposes just for 19 hours now. I have already set a few rules as you can see above. But I am not really into networking. So it ...
0
votes
0answers
17 views

iptables: block communication with others in same subnet

I have a couple of devices in my subnet (e.g. 192.168.0.0/24) and would like to make sure that one of these devices (identified by MAC or IP) can only talk via the router (where I'd like to set up ...
4
votes
3answers
58 views

Why do some TCP reset packets show up in my iptables log?

I started to add some basic iptables rules on my Debian Jessie server. My objective is to filter and log network traffic (for security and learning purposes). Disregarding ICMP packets, these are ...
2
votes
1answer
63 views

Who's messing with my router?

Recently, I've been feeling that somebody is doing bad things to my Access point. My wifi access point is "protected" with a hidden ssid, and a WPA2 password. Nobody granted access apart from me, ...
0
votes
0answers
38 views

How to build via iptables an transparent reverse proxy

I just use an Server with an public ip X.X.X.X to redirect without (changing the header ip) to another public ip Y.Y.Y.Y and the same back. My backend server is windows 2012 r2 and my proxy server is ...
0
votes
1answer
17 views

What does the numbers in brackets means on the iptables-save output?

What do the [368:102354], [0:0] and [92952:20764374] in my iptables output file mean? :INPUT ACCEPT [368:102354] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [92952:20764374]
1
vote
1answer
43 views

iptables - why do I get “Table does not exist (do you need to insmod?)”

I need to install some iptable ruels to block traffic that originates from a certain country, I found this script example on http://www.cyberciti.biz/faq/block-entier-country-using-iptables/ it works ...
2
votes
1answer
32 views

Iptables rule to drop packets to and from local network

I want to set a virtual machine on laptop, but I don't trust the guest system fully, so I would like to block it's access to local network (to network 192.168.0.1/16 or 10.0.0.1/8 or ... the other one ...
1
vote
2answers
28 views

How to use routing to use the next available inetface

My system has 2 interfaces (eth0, eth1). I open a socket and bind it with an ip attached to eth0, now I want the OS to route the packets to another ip (which attached to eth1 but i'm not sure it's ...
0
votes
0answers
26 views

openvpn: iptables not forwarding

I have the following topology: And I'm following the iptables rules listed on https://community.openvpn.net/openvpn/wiki/BridgingAndRouting Here's the output of iptables -L -v Chain INPUT (policy ...
2
votes
1answer
67 views

Local port is not accessible with public IP address

I have a linux server which has public IP and Private IP. So, when ever I login with public IP, the terminal directly shows private IP. example: $ ssh root@55.27.XX.XX root's password: ...
1
vote
1answer
23 views

installed application keeps open port

I installed an application (a text editor) and it keeps a connection alive. I blocked the IP with iptables, but the port stays open. netstat shows: tcp 0 0 127.0.0.1:<port> 0.0.0.0:* ...
1
vote
0answers
17 views

Routing only VM traffic through VPN

I'm stuck on a problem and would like some help if possible :-) My goal is to make my VM going through my VPN connection and my HOST through the standard gateway. Configuration : VM (192.168.100.1) ...
2
votes
1answer
47 views

iptables rule in /etc/rc.local are not loaded

/etc/iptables.conf contains a rule to dump my outgoing packets to 10.199 network as, *filter :INPUT ACCEPT [122:9273] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [73:8165] -A OUTPUT -d 10.199.48.0/24 -j ...
2
votes
1answer
30 views

traffic routing with DNS

I have 2 gateway machines. 1 debian (main - 192.168.1.1), 1 centos (backup 192.168.1.2). There are 2 networks, 1 LAN and 1 WAN, going through "main" and from there over ISP1 "backup" is on LAN and it ...
1
vote
0answers
15 views

How to drop packet if conntrack entry not present

Is there a way to check if conntrack exists before doing a particular action in iptable chains ? I would like to drop the packet in mangle-postrouting if conntrack entry is not present, dont want it ...
0
votes
1answer
13 views

CONFIG_NF_CONNTRACK is not set

I am trying to setup iptables on udoo quad but I hit a brick wall and cannot find a fix anywhere: root@udoo:/# uname -a Linux udoo 3.0.35 #10 SMP PREEMPT Wed Jul 30 18:16:10 CEST 2014 armv7l ...
0
votes
1answer
65 views

iptables do not work, very slow to process on Debian 8

I never had issues with Debian 7 using iptables. However, with Debian 8, I cannot get iptables to work at all. Simple script like this takes several minutes to load and can't access my portal page. ...
0
votes
0answers
12 views

PPTP IPs different than LAN ips

in /etv/pptpd.config I have: localip 1.0.0.1 remoteip 10.0.0.100-200 my server real IP is 192.168.1.40 (my LAN is 192.168.1.0) is it OK to do it? how I can route it so the clients with ...
2
votes
1answer
17 views

route some traffic in subnet to other gateway

I want to route traffic destined for 192.168.5.0/24 to a gateway of 10.1.10.24, but all other traffic to a gateway of 10.1.10.1. I tried: ip route add 192.168.5.0/24 via 10.1.10.24 but it seems to ...
1
vote
2answers
35 views

Using IPTables to Block Ports to Class A Subnets While Allowing Web Ports (80/443)

This is about a cPanel server which, like most servers, is under constant attack from lands afar. Considering that I only host to clients in the US and Canada, there is less of a reason to allow full ...
0
votes
1answer
23 views

How to find what custom config is used by iptables?

I need to open custom iptables config, and change old IP adrees to new. How i can find what custom config is used by iptables?
-1
votes
1answer
93 views

Centos 7 - firewalld - passthrough traffic with firewall-cmd

How can I allow traffic from some hosts network A (behind eth0 interface) through my centos 7 box to network B (some hosts behind eth1). network A: 1.1.1.0/24 network B: 2.2.2.0/24 Firewall ...
0
votes
0answers
47 views

CentOS 6.6 iptables hit count maximum value

I'm working on CentOS 6.6. I'm trying to change the default value of iptables 'hitcount'. But I'm not sure how to change it. I referred to this link for reference. Two problems I see here: I ...
2
votes
0answers
12 views

How to unwrap a tunneled packet in iptables/netfilter and process the tunneled packet

I have a specific question regarding the Linux netfilter/iptables interaction. Let's say I have an IP packet P1 inside of another IP packet P2 (that is, P1 is tunneled). Now, the question is as ...
1
vote
2answers
53 views

iptables -I FORWARD -j DROP does not cut existing connections

Have a router with openwrt. Want to temporarily cut all transit traffic without changing router's configuration. Do: iptables -I FORWARD -j DROP New connections cannot be established now, but ...
0
votes
0answers
37 views

enable/disable domain redirection

My router can be joined by clientes. enable // I'd like to redirect all trafic to an IP (13.37.42.1), I mean any IP and any domain. disable // Then I d like to be able to disable it. Then clients ...
0
votes
0answers
105 views

How to stop default iptables rules being added after reboot in fedora?

I changed from the default firewall (firewalld) back to iptables in the latest release of fedora. This is because iptables is what I use in Debian and I have already learned how to use it, whereas i ...
2
votes
3answers
63 views

Is there a command to deny an IP

Looking at the access log I found excessive access from an IP address. I then edit either .htaccess or .conf files to deny access from that IP. I wonder if there is a command or a oneliner that can do ...
1
vote
1answer
62 views

Redirect outbound traffic on LAN going to port 443 to port 80 or 8080 instead

How would I achieve this, I've tried using iptables a bit but have had no success at all. Any help at all would be appreciated. I basically just want it so that whenever a user on my LAN attempts to ...
1
vote
0answers
34 views

iptables blocking incoming FTP traffic 2/3 minutes after being reset

On CentOS 6.6- At first, iptables was blocking access to my FTP server at all while it was on. After some research I added the lines to /etc/sysconfig/iptables that are suggested in the question ...
1
vote
0answers
31 views

What do the fields in /proc/net/ipt_hashlimit/FILE mean?

What do the fields in /proc/net/ipt_hashlimit/FILE mean? These files are created upon iptables -A CHAIN -m hashlimit--hashlimit-name FILE [...] [...] 9 198.51.100.23:0->0.0.0.0:0 80000 80000 160 ...
1
vote
0answers
54 views

Change timeout of an entry of ipset with iptables rule

I'm trying to create a set with ipset and using it in some iptables rules. ipset has timeout option to set a countdown timeout to an entry of a set to automatically remove it after a period of time. ...
5
votes
1answer
77 views

IPtables - new vs new, established, related

I'm «pretty» new to IPtables, or I have used IPtables a few years, but never with advanced features. I understand the concept of stateful IPtables rules, but recently I discovered that some people ...
0
votes
2answers
27 views

Using IPtables to block outgoing traffic to a TAP interface from a LAN IP address or subnet

How can I configure IPtables to block outgoing traffic to a TAP interface from an IP or subnet?
0
votes
0answers
64 views

Redirect external ip to localhost on ubuntu

I have an application running on an EC2 ubuntu instance. I have mongo db running on the same instance. I have ElasticMapReduce which gets data from MySQL and puts it in the mongo db on the application ...
1
vote
2answers
76 views

Iptables exception for specific port

I'm new to iptables but configured a simple natting today on my raspian: # Always accept loopback traffic /sbin/iptables -A INPUT -i lo -j ACCEPT # Allow established connections, and those not ...
0
votes
2answers
249 views

How to let the Firewall of RHEL7 the SNMP connection passing?

How to let the Firewall of RHEL7 the SNMP connection passing? When I did this command on the computer: systemctl stop firewalld All the SNMP packet are passing well. When I restarted firewalld ...