iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
99 views

IPv6 router advertisement seems to break OpenVPN setup

I have an OpenVPN setup on Debian Jessie, or Raspbian to be precise, that provides an IPv4 and IPv6 subnet for the clients. The server configuration of OpenVPN contains: dev tun server-ipv6 ...
0
votes
1answer
305 views

iptables bad argument '80'

I am running KALI-linux, and i am trying to execute this command: iptables -t nat -A PREROUTING -p tcp –destination-port 80 -j REDIRECT –to-ports 10000 i get this as response: "Bad argument `80'" ...
2
votes
2answers
154 views

iptables: No chain/target/match by that name - adding SSH ATTACK rule

I have a problem with adding rule against brute-force SSH attacks. I try to do it in the following way: iptables -F iptables -L iptables -N SSHATTACK iptables -A SSHATTACK -j LOG --log-prefix ...
0
votes
0answers
42 views

change destination IP address with iptables for infoming traffic

If I run tcpdump on eth0 interface, then I see following ingress packets to my NIC: 15:07:47.174643 00:19:e2:9e:df:f0 > 00:01:6c:55:3a:72, ethertype IPv4 (0x0800), length 194: (tos 0x0, ttl 63, id ...
3
votes
1answer
80 views

How to limit port range in Ubuntu 14.04?

I want to limit source port range in my ubuntu machine upto 20000 , that means no Application should be able to use port higher than that.I have this command in mind iptables -A OUTPUT -p tcp ...
0
votes
2answers
493 views

IPTables - hex string block DNS query

I have a customer that is sending a lot of queries for a particular domain on my DNS server. I want block that queries and I found the hex string that is possible to be implemented. That is the ...
0
votes
0answers
30 views

hostapd in wlan0 makes eth1 interface stop working

I have an embedded system that creates a captive portal so the clients must to login in order to get internet access. The system is running apache and has a webpanel on port 8080 to which I connect ...
0
votes
0answers
724 views

ERROR: CHECK_NRPE: Socket timeout after 10 seconds

getting following error : # /usr/local/nagios/libexec/check_nrpe -H nagios-server-ip CHECK_NRPE: Socket timeout after 10 seconds. But it's working for localhost # ...
0
votes
1answer
27 views

Find my rules in iptables

The iptables rules can be annotated with comments. How to select and remove rules using these comments? Maybe there is another solution to tag rules and remove them based on that tag?
2
votes
1answer
19 views

Firewall that allows to tag or comment rules for easy filtering

I am going to use iptables for port forwarding to listen on requests from my LAN on port 8080 and answer with container at port 80 , like this: iptables -t nat -A PREROUTING -p tcp -d 192.168.1.15 ...
6
votes
0answers
192 views

Linux iptables ssh port forwarding (martian rejection)

I have a Linux gateway performing NAT for my home network. I have another network which I'd like to transparently forward packets to, but only to/from specific IP/ports (ie. not a VPN). Here's some ...
0
votes
0answers
24 views

IPTables weird behaviour

I am running Debian 8.0 with IPTables ... I have many smartphones and tablets that connect to my wireless lan (wlan0) to the net ... wlan0 -> br0 -> eth0 -> router -> internet Everything works just ...
4
votes
1answer
143 views

What is the IPv6 equivalent for 127.0.0.0/8

I am trying to set up an IP6tables firewall on Linux and I basically want to start copying my IPv4 configuration. One of my rules simply accepts all traffic to the localhost subnet: iptables -A ...
1
vote
1answer
88 views

ipset v4.5: Unknown set type

I compiled ipset on CentOS5 32bit machine and i am getting weird errors My kernel: [root@localhost ipset-4.5]# uname -a Linux localhost.localdomain 2.6.18-400.1.1.el5 #1 SMP Thu Dec 18 00:58:32 EST ...
0
votes
1answer
68 views

In what order are the rules handled in the Linux Firewall Module in webmin?

If I'm not mistaken it's top to bottom correct? And the catch-all default action at the end is to just drop any packets that don't match the rules above. Should I be logging the dropped packets as ...
3
votes
2answers
126 views

Ban IP using Iptables/Firewalld

I was DDos Attacked by Chinese Great Firewall twice this year. Now I download zone file from http://www.ipdeny.com/ipblocks/ .I want to do these things: If Someone from Anywhere wants to connect to ...
3
votes
1answer
224 views

iptables: change local source address if destination address matches

I have a Linux machine (RHEL 6.7) with 2 IP's configured on a single NIC (eth1). The primary address, and therefore the address that all traffic appears to come from, is 10.0.0.23. The other is ...
1
vote
0answers
153 views

Iptables proxy, redirect all connections from a certain port to the internet?

I have an ubuntu pc and an android phone conneted to my router through a cable and wi-fi respectively. I set the android phone to use a proxy my-wan-ip:5555 and enabled port forwarding on my router on ...
0
votes
2answers
60 views

How block all request as ServerIP:Port by iptables

I see many http ddos requests to my server as serverIP:80. Its possible to block all incoming requests to myServerIP:Port?
6
votes
1answer
545 views

netfilter/iptables: why not using the raw table?

Under Linux, we usually use the "filter" table to do common filtering: iptables --table filter --append INPUT --source 1.2.3.4 --jump DROP iptables --table filter --append INPUT --in-interface lo ...
0
votes
2answers
87 views

iptables rules apply with delay

I'm using iptables to block Internet (by redirecting to an internal server) access on devices connected to my hotspot. That's my command: iptables -t nat -I PREROUTING -p tcp -s 192.168.43.51 -j DNAT ...
0
votes
0answers
32 views

iptables DNS guard protection

I' m going to implement some DNS security features on my DNS server and I was wondering if iptables can do the same job that cisco ASA/PIX does: DNS guard DNS Guard identifies an outbound DNS query ...
0
votes
0answers
19 views

Redirect Port to another servers Port, not working

I have dig around a lot and found out this batch of code to excute. My main goal is to redirect xxx.xxx.xxx.xxx:30000 to yyy.yyy.yyy.yyy:30333 i execute this code sysctl net.ipv4.ip_forward=1 ...
0
votes
1answer
328 views

Debian 8 iptables-persistent setup is not correct?

I'm renting a vps with debian 8 on it. I'm trying to set up my iptables, following this blog: http://bencane.com/2012/09/iptables-linux-firewall-rules-for-a-basic-web-server/ The problem is that my ...
0
votes
1answer
688 views

Connection refused on port 8081 using curl

I have two CentOS 7 boxes, called Turbo and Demo. I started a daemon/service on the first one, Turbo, and wish to call the service from the second one, Demo. I started the service to monitor port ...
0
votes
1answer
79 views

Iptables: does dropping UDP packets take place in the user-space or kernel-space?

I know that Iptables is a user-space module, I also read it "configures" kernel modules to do big part of the filtering. So my question is, if I add a rule to allow only TCP:443 packets, would this be ...
0
votes
0answers
86 views

IPtables Test/Simulator/WhatIf/Dry run

I am currently debugging a rather strange network phenomenon and still believe my Linux netfilter firewall is the problem. These automagically generated rules and chains give me quite a headache and I ...
2
votes
1answer
62 views

What is the purpose of -m, --match in an Iptables rule?

Many Iptables rules contain this -m or --match option, for example -I INPUT -p tcp -m state --state NEW -m limit --limit 30/minute --limit-burst 5 -j ACCEPT -A INPUT -p udp -m conntrack --ctstate NEW ...
0
votes
0answers
14 views

socks to remote vpn clients on single server

I have the following setup: [user1] > ssh -D 1080 server > [server A a.a.a.a] openvpn --config vpn1.ovpn > [vpn server #1 x.x.x.x] [user2] > ssh -D 1081 server > [server A a.a.a.a] openvpn --config ...
1
vote
2answers
73 views

Is it Safe to open port 35000:40000 for FTP data connections

I recently got hacked so im being careful when changing the settings in my CentOS 7 iptables. I just opened ports 35000 to 40000 for FTP PASV connection, will this represent any security risks?
0
votes
1answer
62 views

Route Locally generated packets to different gateway [duplicate]

I need to send the packets of specific port to different gateway. This is the situation: The server has different services, like http, dns, and mail (smtp,pop,imap), and it has two gateways. eth2: ...
4
votes
1answer
137 views

Using tc for traffic quotas?

Is it possible to implement traffic quotas (absolute limits, not rate limits) based on the network classifier cgroup? I see there is the iptables netfilter 'quota' extension, which seems to do ...
0
votes
0answers
14 views

Ubuntu Network Crashed?

So I have a server from ovh. When I was messing with the network I went to flush iptables and reload the network, and well it crashed all of the ports. So I thought I just need to reboot the server, ...
0
votes
1answer
42 views

iptables selectable tunnel

I have this configuration script: I OPENVPN TUNNELS openvpn --config serverx.ovpn > /dev/null 2>&1 & openvpn --config servery.ovpn > /dev/null 2>&1 & TEST ON MY ...
1
vote
1answer
207 views

On Centos7 firewalld overwrite iptables modules [duplicate]

Simple question: i want to load two modules /usr/sbin/modprobe ip_nat_ftp /usr/sbin/modprobe ip_conntrack_ftp I can put those lines in rc.local or use /etc/sysconfig/iptables-config But at reboot ...
0
votes
1answer
28 views

How to customize Shorewall firewall logs

I am using Fedora 13 machine with shorewall installed. shorewall 4.6.6-RC1 iptables v1.4.7 Below is log format by shorewall: Oct 23 05:28:17 localhost kernel: shorewall:LAN-LAN:ACCEPT:IN= OUT=lo ...
1
vote
0answers
34 views

cups: connection timed out

Per title I'm showing connection timed out in the /var/log/cups/error_log. D [29/Oct/2015:17:43:32 -0400] cupsdSetBusyState: Printing jobs D [29/Oct/2015:17:44:04 -0400] [Job 11441] Connection ...
1
vote
1answer
61 views

iptables DNAT+SNAT: unwanted multiplication of the same udp datagram (and malfunction)

trying to figure out my mistake in the following very simple scenario: |peerA|(Aip:Aport) <--> (Bdev:Bip:Bport)|NatNode|(Cdev:Cip:Cport) <--> (Dip:Dport)| peerD (peer A emits datagrams ...
0
votes
1answer
229 views

route on specific interface based on port

I have a php / bash application on top of a Linux machine with 1 physical interface connecting to e.g., outbound webserver 123.123.123.123 :80. I do this via several openvpn providers. I have both tun ...
0
votes
1answer
26 views

Packet forwarding under Linux shakey compared to Windows, why?

I was previously using Windows 7 to to share wireless internet to a device without wireless capability over Ethernet, and it worked perfectly. I've now switched to a Linux machine and am trying to do ...
1
vote
1answer
47 views

How to fail fast with iptables?

Inspired by the Pi-hole I set up my own one. What it does: The Pi-hole is configured as a dedicated IP in my local net on a virtual adapter of Raspberry Pi. Get list of known spam / phishing / ad ...
1
vote
0answers
53 views

Counter MAC spoofing

I use a public wifi. (connect with id/password on an open network) The network is unstable (download stream 500ko/s then drop 0ko/s and stream stop, if a click a later in the stream it's working ...
0
votes
1answer
35 views

iptables logging for all except ICMP

I have iptables firewalls and its logging for all DROP packets or Deny. I want to tell it to no LOG any packet for ICMP protocol. How do i tell that *filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] ...
1
vote
1answer
21 views

Why are traffic from hosted VMs classified as iptables OUTPUT?

On the machine serving as the firewall for a network, I've installed a VM to bridge to a remote VPN. Since then, I've noticed none of the devices connected to the said VPN had their connections ...
1
vote
1answer
111 views

iptables mangle table with custom chain

I create a new chain in mangle table: $IPTABLES -N newchain -t mangle After that all the 80's port packets I put to that new chain: $IPTABLES -t mangle -A PREROUTING -i eth1 -p tcp --dport 80 -j ...
1
vote
1answer
89 views

iptables LOG only once

I run the following iptables commands to detect and log a port scan: iptables -A INPUT -p tcp -i eth0 -m state --state NEW -m recent --set iptables -A INPUT -p tcp -i eth0 -m state --state NEW -m ...
0
votes
1answer
64 views

Automatically initiate an outbound SSH connection on a server when a client connects

How can I automatically initiate an outbound SSH connection on a server when an internal client connects to that server on a specific port, for any given service, from a given IP range? Note that the ...
0
votes
1answer
41 views

Configure linux PC as a Router

I want to configure my Rasberry Pi as a router. I have two network interfaces eth0 and eth1 connected to two networks. eth0 is connected to a private network and eth1 is connected to a public network ...
0
votes
1answer
221 views

Have iptables run command/script on new connection attempt [duplicate]

How can iptables run a command or script on a new connection attempt? Requirement: External packet to (server interface eth0) ---> (Server interface eth0) input table detects new packet received on ...
1
vote
1answer
42 views

iptables inside bridge

if i have: eth0 (no address) wlan0 (no address, providing wifi-hotspot by 'hostapd') br0 (local IP, bridging eth0+wlan0) eth1 (public IP, providing internet to above by net.ipv4.ip_forward=1) ...