iptables is the userspace command line program used to configure the Linux 2.4.x and 2.6.x IPv4 packet filtering ruleset. It is targeted towards system administrators. Please, when asking a question about iptables, add the output from the following command: iptables -L -v -n

learn more… | top users | synonyms (1)

0
votes
0answers
10 views

How to config iptables to forward connection from/to internal VM

I have an host with proxmox and some virtual machine installed, the first machine is a proxy with haproxy that forward the request to other VM and in proxmox host i have this iptables script: ...
1
vote
1answer
25 views

Need advices on iptables

Helly guys ! :-) . I need a (several?) advice(s) from you about my iptables setup. I'm pretty new to iptables, and this is the first time I configure a server with iptables ONLY as a firewall (we ...
1
vote
1answer
33 views

Linux - show dropped packets form firewall

I am trying to set up a sip trunk and so far everything has gone well. The only issue I face is that the call does is not received when the iptables service is running. By stopping the service ...
0
votes
0answers
17 views

Docker open ports in iptables (rabbitmq)

I'm having a docker image based on rabbitmq. Nothing in my Dockerfile specifies anything about ports. I bind the usual rabbitmq ports (5671, 5672 and 15672) to my custom ports by running my instance ...
-1
votes
0answers
23 views

Incoming connections blocked from some IPs on Centos

I have some server processes running on CentOS. I find that I can connect from some external IPs, e.g., port 4005 has some connections: [root@xxxxx dfxbin]# netstat -an | grep :4005 tcp 0 ...
0
votes
0answers
15 views

setting up iptables dmz for dns (bind9) and web server (apache2) [on hold]

I have a pc server as dns server (example.com) and also a web server inside. I want to access the web server from the Internet using my public IP. What settings should be applied in iptables if the ...
0
votes
0answers
18 views

iptables logging public server

I would like to create iptables for a public webserver, since I would like some stats on how-many times this server is being tried for open ports/ssh logins/ ... To do this I wanted to filter out all ...
0
votes
0answers
9 views

Routing between eth0 <-> tun0 doesnt work

I am configuring a linux vm as a openvpn client to act as router to route to another machines connected to the central vpn hub Data. Lan: 192.168.10.0/24 Remote vpn subnet: 192.168.40.0/24 openvpn ...
0
votes
1answer
21 views

What exactly happens to packets written to a TUN/TAP device?

I'm trying to send packets to an application listening on eth0 from machine's user-space as if they were coming from a remote machine. What I can't seem to find good documentation for is the exact ...
0
votes
1answer
22 views

IPTables from public ip and port to lan ip

I own 3 public IPs for my server and I have multiple VMs that have their own 'job'. The server has 1 NIC. Public IPs: XX.XX.9.247 (MAIN) XX.XX.21.141 (additional) XX.XX.21.142 (additional) LAN ...
0
votes
0answers
7 views

Route Sepcific URL to another interface [on hold]

I have a Raspberry Pi Model B running Raspian. RPi is in between of my local network and Internet Router (as gateway; so all traffic is passing from RPi's eth0 interface to virtual interface eth1). I ...
0
votes
0answers
14 views

How to duplicate multicast packets on several interfaces?

I would like to send a stream from a Linux server to several Linux clients via a multicast address. The clients are directly connected to the server but on different interfaces: bnep0 and bnep1. ...
0
votes
0answers
8 views

L2TP daemon server multiple IP

I have VPS with 3 public IP - Debian 7. I would like to have 3 L2TP damemons (one ip each) NATing traffic to each ip. Something like this l2tp_multiple_public_ip_diagram. I have set up l2tp daemon for ...
1
vote
0answers
37 views

Connect AWS and Azure via OpenVPN

I am trying to connect two networks (AWS and Azure) together via OpenVPN. I am aware of other implementations (OpenSwan+Azure GW etc.) but I need maximal portability as I will be expanding this to ...
0
votes
1answer
21 views

forwarding packet from one interface to another interface

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 ...
0
votes
0answers
34 views

How to prohibit connections on port 25 except from real mail servers - exim, ubuntu

I'm fairly new to email servers, and my VPS has being blacklisted (for the second time) IP Address 45.56.85.76 is listed in the CBL. It appears to be infected with a spam sending trojan, proxy ...
0
votes
0answers
13 views

HTTP DoS prevetion with UFW firewall

I am trying to creator an HTTP DoS attack on my servers using UFW firewall using this Resource. I edited /etc/ufw/before.rules to get the following rules. # # rules.before # # Rules that should be ...
0
votes
0answers
9 views

How to disable or enable Tor transparentProxy without restarting a process

I am scripting FireFox to download web pages with Tor. I am using Tor TransparentProxy because the FireFox proxy is already used by a Data Aggregator. Tor TransparentProxy let you redirect all your ...
0
votes
1answer
15 views

http requests working on KVM virtual machine, mysql not?

I have an Ubuntu server with KVM virtual machines. I allowed SSH in the firewall so I could access the host. Also I allowed incoming traffic that has state related, established. This is the full ...
0
votes
0answers
15 views

force ssh and web server though certain interface [on hold]

I'm running Ubuntu Server, I currently have a VPN to tunnel all my traffic thought it setup. It works great no issues but this one. I can connect ssh,web server,etc on local lan but when I port ...
0
votes
0answers
14 views

Using ppp0 via VPN for everything but ftp [migrated]

I have an ubuntu server I use to wget certain files from the internet via a VPN. I have set the VPN up using PPP0 and currently adjust the route like this: sudo route add default ppp0 Everything ...
1
vote
0answers
10 views

How to use iptables or IFB to mark incoming traffic by device?

I'm trying to use iptables to mark incoming packets based on the device where those packets arrived (rather than their originating IP address or port etc), but haven't found a way of getting this to ...
0
votes
1answer
32 views

iptables v1.4.21: Couldn't load match `-d':No such file or directory

i am running kerenl 3.14.18 and using iptables 1.4.21, built with these options --static-enable --disable-shared. when i run this command: /sbin/iptables -A PREROUTING -m -d 127.3.0.2/24 -j DNAT ...
0
votes
1answer
26 views

New iptables rules only affect new spawned process

Is there a way to update iptables rules to block a connexion without the need of restarting it? Here is an example of the behavior I want to avoid: On shell#1: I start a ping command 8.8.8.8 On ...
-1
votes
1answer
49 views

iptables and routing mechanics [on hold]

At what stages of handling a data packet does the linux kernel apply the different iptables chains and routing? I am looking for a schematic overview of the process.
1
vote
2answers
32 views

NAT-ing with iptables rewrites source IP in logs

I have the following infrastructure in place: internet [outside 81.x.x.x] router [inside 192.168.1.1] | [network 192.168.1.0/24] ...
-2
votes
0answers
22 views

How configure requests from other ports to port 443? [migrated]

I am trying to configure my first https, and i think i get it, but there is a problem: the site wont open in http, just https, because of this, i want redirect everything to https. I am using ...
0
votes
1answer
18 views

ports to open to access samba share

When I turn off my iptables service, I can successfully list my samba shares. But when I turn it back on, I cannot access them at all. Also, my SELINUX is set to permissive Here is my current ...
0
votes
1answer
32 views

redsocks + socks server on different machine

I have the following setup: Host-X (192.168.1.100) running ssh -D so that it can be used as a socks server. Host-Y (192.168.1.101) running redsocks configured with Host-X as socks. They are in the ...
0
votes
0answers
18 views

iptables, outside and inside NAT; Return traffic going out incorrect gateway

Overview (TL;DR at bottom) I have a third party firewall/proxy appliance which is running Linux (Ubuntu), and its routing and firewall engine is backed by iptables and the Linux (source)routing ...
-2
votes
0answers
25 views

Unable to Forward Ports on centOS 6.5

Ports on my machine are not being opened. Here are my iptables -L -n -v and iptables-config files iptables -L -n -v Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in ...
-4
votes
1answer
40 views

Applying firewall rules: iptables-restore: line 1 failed [closed]

I'm trying to do Port forwarding on my centOS machine. When i'm restarting iptables i'm getting the error iptables: Applying firewall rules: iptables-restore: line 1 failed [FAILED]. My iptables file ...
0
votes
0answers
22 views

Temporary IPTable Rules when Process Runs

Struggling to find the solution for this and maybe it's easier than I'm making it out to be. I need to open ports in the firewall when a process runs. That process could be requesting the usage of a ...
0
votes
0answers
30 views

OpenVPN - open ports for clients only via iptables

OpenVPN server running on my ubuntu server (tun mode). My problem is that i cannot set some ports be accessible only for VPN clients. I have a dirty solution, but i want better. I have no iptables ...
0
votes
0answers
23 views

Forwarding traffic between interfaces inside a docker container

I have created a docker container executing the following command docker run -it --net=none --cap-add=NET_ADMIN --name firewall ubuntu /bin/bash after I have attached it two interfaces eth0 and ...
0
votes
1answer
33 views

How to allow only subnet for port with iptables

What i am trying to do is to DROP any packets to specific UDP port, except those one from my secured subnet 10.8.0.0/24. iptables -t nat -A --src 10.8.0.0/24 -p udp --destination-port 63210 -j ACCEPT ...
1
vote
1answer
35 views

Routing between two servers via a virtual interface

I have two servers, each running an openvpn service, the first one (uno) has the vpn range 10.170.0.0/16 tied to UDP 1194, and the second one (dos) has 10.180.0.0/16 tied to TCP 443. I would like to ...
0
votes
1answer
29 views

iptables - Redirect except list MAC Address

I'm using iptables on my router to redirect all web traffic to my page. But i don't know how to except my mac address list. I did command like this iptables -t nat -A PREROUTING -m mac ! ...
1
vote
1answer
14 views

iptables log established connections

I have a rule in my iptables which logs denied connections i.e. -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 I want a similar rule that logs all established ...
0
votes
0answers
23 views

How to bypass OpenVPN per application

I have a linux machine that routes its whole internet traffic through an openVPN connection. It was explicitly configured to work that way. However, the machine has a few applications that should not ...
0
votes
1answer
21 views

Using a pfSense guest to firewall/route traffic for other guests

I was curious if this falls into the "why..." category or not. I have a dedicated, hardware UTM (Untangle) that's serving as an edge device with two hosts and a dozen guests behind it. Right now, I ...
0
votes
1answer
18 views

What is the recommended method for securing a Crate.io installation

I have installed an instance of Crate.io via docker on a CentOS 6.6 machine (that also runs cpanel) By default Crate.io runs on port 4200 and is open to the world. I would like to secure this, so ...
-1
votes
0answers
27 views

IPTABLES forwarding [duplicate]

I`m trying to forward all traffic to remote server to local port e.g. if i try to connect to 10.0.3.43:5901 it should forward me to localhost:10000. I created two rules in iptables ...
-1
votes
1answer
17 views

How to redirect all incoming packets to sniffer in Linux using iptables?

I need to redirect all incoming tcp packets from eth0 to current host (change ip address from 1.1.1.1 to 1.1.1.2) and outgoing tcp packets from sniffer from eth1 to another host(from 2.2.2.2 to ...
0
votes
2answers
26 views

DNAT on the POSTROUTING chain

What happens if I try to do a DNAT in the POSTROUTING chain of the NAT table in iptables? Suppose I change the destination IP of the packet in the POSTROUTING chain to an address that should get ...
0
votes
1answer
28 views

Iptables: some ports are closed despite being open by my iptables; can it be something else?

Beginner question. I set up the following iptables rules: #!/bin/sh # Réinitialise les règles sudo iptables -t filter -F sudo iptables -t filter -X # Bloque tout le trafic sudo iptables -t ...
-1
votes
0answers
22 views

Redirect outbound VPN specific client to specific IP address using IPTABLES

i have a pptp server, y have 2 publics IPs on the server. The second IP address is the same as the VPN client (set on the CHAP file). I wanna redirect all outbound traffic from the VPN client ...
-1
votes
2answers
39 views

Differences between iptables and ip6tables processing of packets

I've reviewed a variety of netfilter, iptables, and ip6tables resources. I've searched Google, including StackExchange websites for information, and, I can't find easy or clear links to information ...
15
votes
6answers
2k views

Will blocking all connections outside of the US, aside from port 80 cause a high server load?

Like most servers (I assume), we have people trying to brute force our services 24/7. I have cpHulk blacklist their IP's, but it seems like it'd be better if they didn't get that far in the first ...
0
votes
1answer
33 views

transparent proxy (SSL error)

Right now we are having transparent proxy in our network environment. we have been set proxy settings to browsers in all systems. While accessing the https sites in browsers no issue but few of ...