iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
5 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 /* ...
5
votes
3answers
1k views

Port fowarding and load balancer in ubuntu server 12.04

I am looking to create a load balancing server. Essentially here is what I want to do: I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a ...
0
votes
0answers
19 views

Getting iptables to pass wlan0 traffic

My network is as follows: wlan0->br0->eth0->router->internet wlan0 is there to allow wireless devices (smartphones, tablets etc.) to have wireless access to the internet. Everything goes eventually ...
1
vote
0answers
34 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 ...
1
vote
2answers
35 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 ...
2
votes
0answers
26 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
5k 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
33 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
10 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
18 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 ...
2
votes
1answer
17 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
77 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 ...
0
votes
2answers
469 views

PPTP: Allow remote clients to communicate with each other

I have a PPTP server. Clients log in to the server, but can not ping each other. The clients are at different locations. The problem is with my IPTABLES forward chain .... here is my iptables: ...
1
vote
3answers
19 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 ...
1
vote
1answer
2k views

iptables to allow teamviewer

I'm having some trouble to allow TeamViewer in a restrictive iptables configuration. I'm running Fedora 20. After some research I found out TeamViewer uses ports 80, 443 and I have created this ...
3
votes
3answers
52 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
34 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 ...
4
votes
2answers
746 views

Policy routing with load balanced ppp connections

This my setup using Debian 6.0. 6. It's role is a proxy server and a load balancer using eight 3G modems. Whenever a ppp connection dials it takes over the default gateway which is ok but it also ...
0
votes
1answer
45 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 ...
1
vote
2answers
25 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
2answers
27 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
14 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
21 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 ...
2
votes
1answer
48 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 ...
0
votes
0answers
19 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
1answer
3k views

Port Forward :80 and :8080 to Two Different Servers

On a CentOS 6 server with an IP address of 172.16.1.10, how can I configure iptables to route traffic destined for 172.16.1.10:80 to 192.168.1.10:80, and traffic destined for 172.16.1.10:8080 to ...
1
vote
2answers
2k views

iptables - Redirect web traffic to LAN Server

I have a webserver which is running on ip address 192.168.11.100 How can i use iptables to redirect all web traffic (http and https) to my webserver on LAN? After that i want to add except list mac ...
1
vote
0answers
18 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 ...
0
votes
0answers
9 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 ...
4
votes
1answer
64 views

How to redirect web traffic to specific host with iptables

I want to be able to redirect a host in my Lan to an specific ip address and port. I can achieve one thing which is that only my desired host can access the ip address, but I can't get the user to ...
1
vote
0answers
15 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 ...
1
vote
1answer
43 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
2k views

forward packets from one interface to another interface using iptables

I have an embeded system with 2 interfaces e0 and m0, whose ips are 10.0.0.20 and 192.168.0.20, respectively. Incoming packets into e0 have an ip of 10.0.0.10 and should be forwarded to m0 interface ...
1
vote
2answers
36 views

iptables for Asterisk

I am running Asterisk with FreePBX. I would like to log all failed attempts and after a while ban them. Ideally after 3 failed attempts in 1 minute, ban for 1 hour. Is it possible to see if this ...
15
votes
4answers
17k views

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
1answer
77 views

What is blocking: Firewall and tcpwrapper?

Is it possible to find whether the firewall (iptables) or tcpwrapper is blocking a connection without accessing the remote server? (Maybe with tcpdump?)
1
vote
1answer
2k views

iptables allow only ssh and vpn traffic

I have dedicated server with ubuntu 14.10 installed. The server should connect to an openvpn server and the traffic should only go through the vpn, except for SSH traffic. My idea is to realize it ...
0
votes
1answer
35 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. ...
6
votes
2answers
282 views

Setting traffic class on return packets

I have a network topology: Server <-> router1 <-> router2 <-> router3 <-> edgeRouter <-> "internet" All routers are linux based, and support iptables. The server sets ...
3
votes
1answer
2k views

I opened a port with iptables but still doesnt work

I have a CentOS installation as a guest VM with VirtualBox. I have two ethernet interfaces, eth0 with NAT and DHCP, and eth1 with Host-only adaptor and static IP. I have oracle installed in this ...
0
votes
3answers
36 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 ...
-1
votes
0answers
7 views

Iptables on Chromebook [duplicate]

I am having a problem when trying to execute the command iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 808 This gives me an error saying no chain/target/match by ...
0
votes
0answers
7 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 ...
3
votes
1answer
73 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 ...
4
votes
2answers
2k views

Iptables GEOIP not working under Debian Squeeze

I've just installed xtables-*, compiled the geoip database, but when I try to use an iptables command it always gives back the following error: Command iptables -I INPUT -p tcp --dport 80 -m geoip ...
1
vote
1answer
20 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 ...
2
votes
1answer
54 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
36 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 ...
0
votes
1answer
25 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 ...
1
vote
1answer
30 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 ...