iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
1answer
23 views

secure my servers with iptables

I have 2 vps servers (debian 7 & 8) with a public IP address and I would like to protect them. I would like to have access only to SSH (public/private keys), openVPN, services that are requested ...
1
vote
1answer
35 views

Searching for a solution to set up a reverse proxy for game servers

I run a game server on my dedicated box in country A, which runs Linux and communicates with its clients using UDP. The server has players from both inside and outside Country A. Players within ...
0
votes
0answers
16 views

VLAN sub-interfaces and Netfilter

Is it correct to think that from Netfilter point of view there are no separate packet flows for physical interface(for example eth0) and VLAN-interface associated with the physical NIC(for example ...
2
votes
1answer
84 views

How to add marks together in iptables (targets MARK and CONNMARK)

When you want to mark a packet in iptables, you would generally add the following line to your firewall script: iptables -t mangle -A POSTROUTING -p tcp -m multiport --dports 80,443 -j MARK --set-...
4
votes
0answers
84 views

TC (Traffic Control) to control bandwidth

I'm having an issue with a bandwidth script that I've been using for a while to limit the outgoing bandwidth on a port. It worked fine at the beginning until I wanted to change the outgoing port ...
0
votes
0answers
31 views

iptables for tomato to block all non-vpn traffic

I have been combing through a few forums of many VPNs that have iptables for the tomato router. Most don't work. The one from VPN.ac recommends adding under Administration > Scripts > Firewall ...
0
votes
1answer
16 views

Does 'multiport' make a difference in terms of efficiency?

Can any one can say definitively that using the --multiport extension with iptables rules: Is faster than creating a rule per port? Is slower than creating a rule per port? Makes no difference? If ...
1
vote
2answers
47 views

IP tables for home use

I've been trying to set up rules for a desktop I have in my home network and even though at first this configuration worked, I changed something somewhere and now it won't pass any kind of connection. ...
2
votes
1answer
32 views

Can you send a TCP packet with RST flag set using IPTABLES as a way to trick NMAP into thinking a port is closed?

I am learning Nmap and a thought occurred to me with regards to a SYN scan... A SYN scan sends an empty TCP packet with the SYN flag set to illicit a response from the target of either RST, ...
2
votes
1answer
98 views

How can I mark a flow with iptables?

I read this tutorial, however I am considering a method to load balancing for Internet connection by applying iptables rule on 2 interfaces. The following is my iptables rule. #!/bin/sh IPT="/sbin/...
0
votes
1answer
28 views

Understanding Iptables rules to prevent DDoS

Following IPTables rules exist on my system as some preventive measures against DDoS attacks -A INPUT -s 255.0.0.0/8 -j LOG --log-prefix "Spoofed source IP" -A INPUT -s 255.0.0.0/8 -j DROP -A INPUT -...
1
vote
2answers
106 views

How does NAT reflection (NAT loopback) work?

I use the auto generated rules that come from OpenWRT as an example of NAT reflection (NAT loopback). So let's pretend there's a network 192.168.1.0/24 with two hosts (+ router): 192.168.1.100 and ...
0
votes
1answer
22 views

iptables connection refused in VLAN network when iptables configured NAT and port forwarding

I have a static IP X.X.X.X. I configured a Linux server as a router by using iptables. The following figures as my network topology: ppp0 +-------------+ +----------+ |...
0
votes
1answer
28 views

iptables connection mark not balance

The following is my network topology: + + | | | | | | | +-----------...
1
vote
3answers
72 views

log connection attempts from an IP blocked by iptables

I blocked an abusive IP from a CentOS server using iptables, dropping all connection attempts on all services / ports. As is the way of things, the server with this IP may have been part of a botnet, ...
0
votes
1answer
38 views

understand chains and tables in netfilter/iptables

As I understand, Linux kernel has five hook points for IPv4 packet flow defined in netfilter_ipv4.h file: /* IP Hooks */ /* After promisc drops, checksum checks. */ #define NF_IP_PRE_ROUTING 0 /* ...
1
vote
0answers
48 views

Why fail2ban doesn't put some IP address in jail

This is several days ago, I observed some IP addresses was't banned by fail2ban, and continued to brute force attack on different port of ssh. This an extract of my logwatch: undef: 22 times a [...
4
votes
1answer
96 views

Identifying source of audit messages in kern.log

I recently installed the auditd package on my Debian machine. I did some testing with auditctl, creating a single rule to watch a directory, proved something, and then removed and purged auditd. ...
0
votes
1answer
50 views

How do I make sure the iptables is closed?

I want to disable iptables completely. I followed the instruction like /etc/init.d/iptables close it said there No such file or directory [root@dataapp02 tmp]# service iptables stop Redirecting ...
1
vote
1answer
20 views

Linux + iptables fallback

I want to enable the routing VIA tcp from port 770 to port 7714 iptables -t nat -A PREROUTING -p tcp --dport 770 -j REDIRECT --to-ports 7714 . so I get the following: iptables --table nat --list ...
1
vote
1answer
89 views

Changing IPTables to Allow FTP over TLS Using Passive Ports

I am using Arch Linux. I followed a tutorial to change /etc/iptables/iptables.rules to allow only the basic ports for my web server. I also used /etc/modules-load.d/nf_conntrack_ftp.conf to enable ...
3
votes
1answer
32 views

How to make iptables logs to identify protocols by name and not by number?

In my iptables log files (Ubuntu 16-04), all messages from my LAN router and from other hosts in the LAN, related to IGMP have "PROTO=2". Is there a way to change this and get "PROTO=IGMP"?
3
votes
3answers
210 views

Why does SNAT happen in POSTROUTING chain and DNAT in PREROUTING chain?

Why does SNAT(modifies source IP and/or ports) happen in nat table POSTROUTING chain, i.e after routing? And why does DNAT(modifies destination IP ant/or ports) happen in PREROUTING chain? I guess ...
1
vote
2answers
64 views

Is firewalld the same as iptables?

I tried to close iptables on RHEL 7.2 using chkconfig iptables off error reading information on service iptables: No such file or directory tried /etc/init.d/iptables stop too, got -...
1
vote
3answers
27 views

How to access a URL filtered only for my public IP from outside my network

There is this URL which I can access from inside my network, because they allowed my public IP to access it. All other IPs are denied. how can I configure my iptables so that I can access this ...
3
votes
3answers
62 views

IPtables installation question

I am new to installing iptables and have an excellent book called "Linux Firewalls: Attack Detection and Response" by Michael Rash. I have a few questions before I begin. I want to make an ...
1
vote
1answer
55 views

iptables DNAT: 'No chain/target/match by that name'

I am trying to use DNAT on a new custom Linux target, but I get an error with the following basic command: #iptables -t nat -A PREROUTING -d 10.110.0.250 -p tcp --dport 9090 -j DNAT --to 10.110.0.239:...
1
vote
2answers
26 views

how to remove iptables port mirroring rule

I don't have much knowledge on iptables. I googled the port mirrioring with iptables iptables -t mangle -I PREROUTING -j TEE --gateway 10.20.0.129 iptables -t mangle -I POSTROUTING -j TEE --gateway ...
0
votes
1answer
84 views

Iptable rules for squid on centos 7

I have two interfaces in my proxy server eth0 and eth1. where eth0 connects to local (private) network wile eth1 connects to internet.My squid version is 3.3.8 and centos 7 is my OS. I have to ...
0
votes
0answers
19 views

IPTables/IPRoute + Avoiding VPN

I have a debian jessie headless server running an OpenVPN connection. However there is certain traffic I don't want passing through the VPN, and would rather pass through my local gateway. I have ...
0
votes
0answers
33 views

Unable to access http server when ufw is running, on Raspbian?

I have a Raspberry Pi running Raspbian, with Apache2 for the web server. Some recent change seems to have broken my ability to access my web server, when ufw is running. The server simply doesn't ...
0
votes
1answer
45 views

iptables forward all traffic to 2 different interfaces

I'm currently using dnsmasq to create a small Debian box as a DHCP and DNS cache server. Until today, I had just 2 interfaces (eth0, eth1). One connected to my WAN (eth0) and one connected to my LAN (...
0
votes
2answers
75 views

Packet flow in a virtual bridge with two interfaces, centos 7

I am struggling to create a bridge firewall with iptables since I cannot find/catch packets flowing through a bridge with two interfaces in centos7. No ip addresses are configured on interfaces or the ...
0
votes
0answers
22 views

SQUID proxy not allowing to access internet

I am using centos 7 and I have followed this tutorial to install transparent proxy on my system. Every step has been done successfully but when I try to access internet from any client. Nothing is ...
1
vote
0answers
30 views

Iptables multiple port redirects based on destination address

I have iptables setup for selective routing. In the current configuration it checks if the dst address is listed in a specific chain and if it is not it redirects the traffic to my proxy port which ...
0
votes
1answer
44 views

Block incoming port

I installed LabView on a Scientific Linux 6 machine and promptly got a message from our security officer, stating that the port 3580 is open and listening and that this is a security issue. Apparently,...
0
votes
3answers
45 views

iptables: block all inbound traffic over a certain port number

It is possible using iptables (on Debian) to block all inbound connections for all the ports with a port number over (as an example) 16000. Like this (using 16000 as reference): The port 15999 is ...
0
votes
0answers
22 views

Block incoming traffic in bonding mode when primary interface is down

My server running on latest kernel (4.4.6) has configured a bond device (bond0) with two enslaved interfaces eth0, wlan0 with primary interface eth0. cat /proc/net/bonding/bond0 Ethernet Channel ...
2
votes
1answer
55 views

Shorewall to protect interfaces that are not yet defined

I am planning to use Shorewall to filter traffic that originates from a virtual interface created by OpenVPN (lets call it tap0). If OpenVPN did not successfully create this interface before ...
1
vote
1answer
32 views

Route specific traffic to specific interface

I have two NICs. Basically, I want to use one of them for specific traffic (based on the destination IP or the domain) and the second one for the rest of the trafic. Is this possible? If it is, How ...
1
vote
0answers
29 views

OpenVPN block SMTP Access Server completely

I've tried almost all iptables rules to block smtp on openvpn server but still clients clients can access remote smtp servers on port 25. I'm using openvpn access server. It's creating two interfaces ...
1
vote
1answer
59 views

How do I amend these iptables rules so that they bind HTTP traffic to my VPN connection?

I have followed this guide to set up a VPN service to send the data to/from transmission-daemon from my device running Debian. #!/bin/sh # Print environment variables for transmission's benefit ...
2
votes
1answer
156 views

Don't allow docker internet access

I'm looking for a simple way to limit my docker containers so they only have local access and not internet access. I've tried using IPtables to do this and the following works: iptables -I FORWARD -...
0
votes
1answer
46 views

Dose iptables NAT overwrite user agent of HTTP headers?

If i use iptables to NAT all HTTP traffic behind another network, does it overwrite user agent of HTTP headers? The rules are as follows: /usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j ...
3
votes
1answer
109 views

PPTP VPN not working with Linux router

ORIGINAL: I've just switched from an old Linux install (Debian squeeze) to a new one (Linux Mint 17.3) for my router (I am using a full desktop PC with a Linux install as my router). The Linux PC ...
1
vote
1answer
37 views

Answer redirect IP to specific port

I want make a system that has a few subdomains. I set each subdomain to IP address using DNS. I used random IP addresses for the question 165.93.198.34 x.mydomain.com (Which is actually 165.93.198....
2
votes
1answer
66 views

Blocking a specific external IP:Port connection in RedHat?

I know that in RedHat, in the IP tables I can block incoming connections to a local port. I can also block connections from a specific IP. But is it possible to block a connection from a specific IP ...
2
votes
0answers
72 views

How to debug what is stopping ping to respond on our server?

We used to have a sysadmin person months ago who had disabled ping response on one of our servers. But now we want to re-enable ping response. I tried to check if the ping was disabled from config. ...
0
votes
1answer
72 views

Redirect https request on local network

I'm trying to implement a local web server that handle all the http requests. Basically, when a user connect to the network and open an url, he is redirected to my local web server. I'm using dns ...
1
vote
1answer
53 views

lxc container <-> external internet, what I missed?

I have Ethernet on my machine (enp0s10) that connected to real network, and I have lxcbr0 Ethernet bridge which gather lxc containers. And I want to make available one of lxc containers. So I wrote: ...