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
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 ...
0
votes
3answers
2k views

Forward traffic to local LAN IP while keeping the originator IP

I am trying to forward traffic from one server to another, while keeping the origin requestor IP. Therefor I cannot use SNAT or MASQUERADE. SERVER A: Public IP: 111.111.111.111 Private IP: 10.0.0.1 ...
0
votes
1answer
22 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 ...
5
votes
4answers
3k views

Copying packets from an interface to another

I have a Linux system (let it be A) with 2 ethernet cards, namely eth0 and eth1 which are attached to two totally unrelated LANs. Basically eth0 is used for normal application traffic and eth1 is ...
1
vote
0answers
41 views

IPTables on two interfaces - cannot see where I'm going wrong

Ubuntu 14.4 I have used iptables before without issue but am having a real struggle with them today. I have two cards eth0 and eth1. eth0 does have more than one ip so has eth0:0 and eth0:1 etc. If ...
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
votes
1answer
19 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 ...
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 ...
3
votes
1answer
11k views

How to open a 8080 port for an application, with iptables

I am a total newbie concerning servers so excuse my humble question :-) Someone developed for me a python application that acts as a web serveur. This TCP application needs to listen to port 8080. ...
-2
votes
2answers
790 views

how to intercept(not only capture) outgoing packets from TCP programs(or specifically TCP stack)? [closed]

I have a web server running on a host and I want to intercept all packets(including IP/TCP header) sent by the webserver, so the packets are not sent out to the Internet by the web server directly. ...
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 ...
5
votes
4answers
2k views

Openvpn, forward packets very slowly

I rebooted my server, and an odd issue just came out. I am running on ArchLinux, the clients are Ubuntu, Android and Mac. The problem is that accessing the internet via the clients is slow, about ...
0
votes
1answer
984 views

IPTables port forward Remote mysql to localhost

i have a MySQL server1.1.1.1 and I need port 3306 in 1.1.1.1:3306 port forward to my secondary server 2.2.2.2:3306 I don't have access to MySQL server. i have tried iptables -t nat -A PREROUTING -p ...
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
29 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 ...
0
votes
1answer
2k views

SSH Socks Proxy wiith iptables REDIRECT

I have googled and haven`t found the answer on my question. Help me please. There are two servers: serverA with public IP 12.0.0.10 and an private IP 10.0.0.5 serverB with public IP 20.0.0.11 I ...
6
votes
5answers
4k views

How to duplicate TCP traffic to one or multiple remote servers for benchmarking purposes?

Infrastructure: Servers in Datacenter, OS - Debian Squeeze, Webserver - Apache 2.2.16 Situation: The live server is in use by our cusotmers every day, which makes it impossible to test ...
-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 ...
0
votes
1answer
65 views

Linux: Bridge two NICs and route traffic through VPN tunnel except specific destinations and ports

I have a Linux PC (Debian Wheezy) with two Ethernet adapters. Adapter eth0 is connected to the Internet (modem/router/DHCP/firewall thingy) and eth1 is connected to an WiFi access point. All other ...
0
votes
1answer
2k views

strongswan VPN on OpenWrt

Hi I'm running Barrier Breaker version of OpenWRT and I have setup a VPN according to: http://wiki.openwrt.org/inbox/strongswan.howto I can connect to the VPN with my iPhone or Mac (to 10.10.1.0/24 ...
-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 ...
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
52 views

Port 53 in Amazon Security Group

Everything works as expected. This question is for learning purposes only. Using Amazon Security Groups in a VPC. Outbound rules are: 0.0.0.0/0 Port 80 0.0.0.0/0 Port 443 Iptables allows OUTPUT ...
0
votes
1answer
889 views

iptables forwarding through virtual interfaces

I'm trying to configure my computer as a gateway between two networks, but I cannot make it working for some reasons Here is a representation of the network: 192.168.1.101 192.168.1.102 ...
1
vote
3answers
3k views

Howto use ipset and iptables on Ubuntu 12.04 to block lots of IPs

I would like to use this tutorial: http://www.jsimmons.co.uk/2010/06/08/using-ipset-with-iptables-in-ubuntu-lts-1004-to-block-large-ip-ranges/ In Ubuntu 12.04 the package ipset-source is removed from ...
0
votes
1answer
34 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 ...
0
votes
1answer
24 views

General approach for isolating a WLAN with iptables? [closed]

I'm trying to use a 2-port plus WiFi adapter NAS as a home router, and I'd like to know roughly how big an undertaking the following would be using iptables: forward masqueraded client traffic from ...
0
votes
0answers
27 views

PCI says port 36141:TCP is blocked. But 36141:TCP open on iptables

PCI compliant scan fails due to port 36141:TCP is being blocked on website. I verified I cannot connection via 36141 on same server to itself: # nc -zv 127.0.0.1 36141 nc: connect to 127.0.0.1 port ...
2
votes
1answer
33 views

Squid problems with iptables

I've installed and configured Squid on Fedora Server 21 with full updates. My proxy's IP is 145.130.33.133 with port 3128. First I modified my squid.conf with my rules and everything. On my laptop ...
0
votes
1answer
34 views

iptables - openvpn can't access port 80

I have a server set up with OpenVPN. While connected to the VPN, all external websites work great, but when I try access a site that is hosted on the same server, it fails to connect. I can ssh into ...
1
vote
3answers
626 views

Redirection with IPTABLES while hiding the original port

So, I have my Glassfish server is listening on port 8080. However, I want to have my requests at port 80 while hiding 8080, so that people think my server really runs at 80. How can I do it with ...
1
vote
1answer
72 views

Configuring IPtables to mirror traffic in CentOS

I'm trying to set up iptables to mirror traffic coming into eth2 and send to 10.1.4.4. I have been reading a lot of documentation on this but am having some issues. Here is the command I am trying ...
0
votes
3answers
52 views

How to route all local trafic to Squid?

I have a working squid caching server which is accessile through 127.0.0.1:3128. I'm trying to route all my trafic(and if possible all my virtual machines) to 127.0.0.1:3128. I'm using vagrant and ...
3
votes
2answers
2k views

Service can't connect to self using public IP, NAT problem

I have a dedicated server from serverloft.eu, but due to some network security I cannot use bridge networking on my server. So I have setup all my IPs to the main eth0, and used NAT to forward trafic ...
0
votes
1answer
30 views

Port redirection with iptables to localhost / blocking the destination port

I like to forward all traffic coming to 80 to be redirected to 8000. I used iptables -tnat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8000 But then port 8000 is still open to ...
1
vote
1answer
33 views

Why can't I connect to my remote MySQL Server?

I have a asterisk server that is set up in on a VPS provider. I need one of my local applications to connect to the database to pull reports, but I am having dificulty getting a read only connection ...
-1
votes
1answer
23 views

Redirect port without opening it

I have the following iptables configuration iptables -P INPUT DROP iptables -A INPUT -i eth0 -p TCP --dport 443 -j ACCEPT iptables -A INPUT -i eth0 -p TCP --dport 10001 -j ACCEPT iptables -A ...
0
votes
1answer
51 views

Forwarding IP address using pf

I'm trying to forward an external IP address to another external IP address with pf. The equivalent iptables command would be iptables -t nat -A OUTPUT -d [ipaddress1] -j DNAT --to-destination ...
-1
votes
1answer
30 views

UDP reverse proxy on Linux [duplicate]

I have a dedicated server which hosts game servers, and is vulnerable to DDoS attacks. I want to get a DDoS-protected VPS to act as a reverse proxy for UDP. The dedicated server's IP address is ...
-4
votes
0answers
22 views

Port Forward :80 and :8080 to Two Different Servers [migrated]

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 ...
0
votes
1answer
110 views

Google Computer Engine Firewall and IpTables

I am very new to to server administration and just discovered that I can use Google Compute Engine to host my website similar to way it works with Linode or Digital Ocean. I am unsure on the following ...
6
votes
4answers
9k views

iptables nat does not exist

Today my iptables nat on the host system stopped working and I have no clue what happend! (That's very bad, I know) All commands are executed as root user. If I run $ iptables -t nat -L I get the ...
1
vote
1answer
25 views

iptables connlimit: exclude multiple IP addresses

I have currently this IPTABLES command: iptables -A INPUT -s ! 192.168.0.2 -p tcp --syn -m connlimit [...] -j DROP As far as I know, such rule limit some number of connections following various ...
0
votes
1answer
2k views

iptables forward rule not working in openwrt

I am trying to apply some iptables forwarding rules in openwrt. Here is my scenario - My server has two cards ath0 and br-lan. br-lan is connected to internet and ath0 to private network. The other ...
0
votes
1answer
26 views

Iptables overridden after reboot in Ubuntu server

On my Ubuntu server (installed KVM and Kimchi), I noticed that the iptables are changed after a reboot. Unfortunately I did not find out which script is responsible for these changes. I tried to ...
0
votes
2answers
462 views

basic iptables rules

I am trying to secure my vps server running ubuntu HardyHeron (8.04 lts). I am using iptables to block almost all incoming traffic. I wish to allow the following: Web traffic (80 & 443) mail ...
1
vote
3answers
4k views

How to get Passive FTP Working Through an Iptables Firewall?

I have an iptables firewall running on a Fedora Linux server that is basically being used as a firewall router and OpenVPN server. That's it. We have been using the same iptables firewall code for ...
0
votes
1answer
21 views

Inbound IPTables rules based on queried domain

I have an odd situation and I'm not entirely sure if it is even possible in IPTables. If it isn't, that's fine and I can do without. If it is, fantastic, I'd love to see how to implement it. So, my ...