Iptables is a module that provides the Linux operating system functions of firewall, NAT and logging of data traveling over a computer network.

learn more… | top users | synonyms

1
vote
1answer
132 views

With iptables only allow certain outbound ports

Okay, I'm running a router with shibby tomato (linux based) v1.28-115 and have a bridge network setup (br1) that consists of a guest wifi. I want to only allow access to specific outbound ports... ...
0
votes
3answers
692 views

Use iptables on gateway for port forwarding

I have a Linux machine in my local network that I use as a gateway, so all of my network traffic passes it (the machine has only one network interface which I use for incoming and outgoing traffic). I ...
0
votes
1answer
84 views

Will using iptables DROP target cause TCP CLOSE_WAIT that never completes?

I have some simple rules to block certain IP blocks used frequently by hackers/spammers, e.g.: iptables -A INPUT -s 173.208.250.0/24 -j DROP But, I noticed that apache hangs after a couple of days ...
3
votes
1answer
2k views

How do I forward traffic between Tun device and eth0?

In summary, I would like to have Tun device traffic forwarded back and forth through another network interface that has internet connection. While I can see the traffic going out to internet ...
0
votes
1answer
242 views

iptables stupid error (iptables -A INPUT -j ACCEPT)

[root@router ~]# iptables -A INPUT -j ACCEPT iptables: No chain/target/match by that name. How is that possible? I recompiled the kernel (3.11.8) and updated iptables to 1.4.16. The strage thing is ...
0
votes
0answers
88 views

iptables messing up Tomcat?

I encountered the following problem(s) using Tomcat 7 with iptables on. 1) Namely, there's this Tomcat 7 instance that I run on server-1 (directly exposed), and this Tomcat instance hosts a REST ...
0
votes
0answers
85 views

Session limit for OpenSSH server on Ubuntu Desktop 7.10

I need restrict session limit on my OpneSSH server only for one session (one connection). I use Ubuntu Desktop 7.10. Of course Version is old, but I need it for experimental purposes. I tried modify ...
0
votes
0answers
136 views

centos 6.4 nat virtual machines not able to connect to the internet

I have two virtual machines running on virtual box. The master has one interface(eth0) bridged to the host nic(eth0) and another one connected to the internal network(eth1). This acts as a gateway to ...
1
vote
1answer
330 views

Chromecast, Unblock-Us and Edimax BR-6478AC router

It seems that Google has hard coded the Google DNS into the Chromecast, thus making it pretty much useless for anyone outside the U.S. who wants to use it for Netflix and Hulu. I have the above ...
-3
votes
1answer
2k views

How do I block all ports except 22 and 80 in Centos6.2 64bit

How do I block all ports except 22 and 80 in Centos6.2 64bit. thanks all.
0
votes
0answers
184 views

Req' Iptables Guru: rule to forward to HTTP proxy

I have a RPi with two interfaces, wlan0 and eth0. Through eth0 I have connected a set-top-box (STB): the network for eth0 is 192.168.2.0/24. My experiment is to use a transparent HTTP proxy ...
0
votes
1answer
283 views

INPUT or PREROUTING, which is first checked?

About iptables. I saw contradictory explanations. This site and most article say PREROUTING chain is checked before INPUT chain. But another tutorial(page 4-6) says INPUT is before PREROUTING. Whom ...
-4
votes
2answers
94 views

Is there a way to pause/resume particular TCP connection?

I'm playing online game that matches me against random players. I found out that when I unplug my Ethernet cable, I have a minute to decide do I want this match to count. If things go wrong, I just ...
0
votes
0answers
30 views

Allow INPUT port for specific UID

I want to restrict an open UDP port from the INPUT chain to a specific UID, so that only if a process belongs to the UID, it receives packets on that port, otherwise they are rejected. For some ...
0
votes
0answers
51 views

Web proxy on LAN - iptables and Win Firewall

My LAN is simple: Router: C.C.1.1 Win 7 laptop: C.C.1.2 RPi: C.C.1.3 "C.C" = 192.168... The Win 7 laptop is connected via its WiFi interface. I have connected another machine (let's call this ...
2
votes
1answer
239 views

CONNMARK on rewritten packets

I have a host, on which I rewrite saddr and daddr of IP packets coming to it, this is done by the program, employing libnetfilter_queue. Basically it acts like proxy. For example, the packet comes ...
0
votes
1answer
560 views

Centos 6 server does not open ports

So after some battling and struggling with the firewall, i see that I may be doing something or the firewall isnt responding correctly there is has a port filter that is blocking certain ports. Okay, ...
0
votes
1answer
686 views

debian gateway using iptables

I am having problems setting up a debian gateway server. My goal: Having eth1 the WAN interface. Having eth0 the LAN interface. Allow both ports 22 (SSH) and 80 (HTTP) accessed from the outside ...
0
votes
1answer
26 views

List rules using iptables in a customized way

How to list the iptables rules in a customized way? Like: target protocol portnumber src dest the order could be changed but I dont want the name of protocols, just number (like 80 instead of http) ...
0
votes
1answer
289 views

Can't ping through default gateway

I have the following configuration: Routing table on M3 is: Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.2.1 0.0.0.0 UG ...
0
votes
0answers
203 views

SCP over NAT stalls at 2112KB

I have two systems (A and B) on different subnets, with one dual-homed box (C) that can see both. I use iptables DNAT on C to port-forward SSH to B, so that A can run ssh -p 12345 hostC to connect to ...
0
votes
1answer
244 views

Install multiport module on iptables

I'am trying to install "fail2ban" on Cubidebian, a Debian port for Cubieboard (A raspberry like board). The following rule failed due to "-m multiport --dports ssh" options (It works, when i run ...
0
votes
1answer
205 views

Understanding how dnat works in iptables

I'm running 3 virtual machines with Fedora 19. The machine B is set up with two networks adapters and provides que channel between machine A and machine C. The machine A IP is set to 192.168.1.3 and ...
1
vote
1answer
1k views

Iptables redirect to localhost?

Suppose I have a network with a server routing all connections from inside the network to the Internet. How can I set up iptables so that instead of routing incoming connections to the Internet, it ...
0
votes
1answer
86 views

NM+iptables: How to forward port to shared wired connection?

I connect to my wireless network through NetworkManager. In addition I have another computer connected to the first one through ethernet. I'm using NetworkManager to share the wireless connection of ...
0
votes
1answer
150 views

redirecting traffic from a network interface to dansguardian

I have setup a Squid + Dansguardian parental control at home. I connected a WIFI router to the Ubuntu machine and share that network for my kids' mobile devices. The parental control works fine on the ...
0
votes
1answer
275 views

Redirect PROXY traffic to test box using IPTABLES

Marked this as answered. I'm going to pass on trying to get this to work. It was only for testing. I'm currently using a proxy server (squid) that's listening on port 8080. Users' browsers are ...
1
vote
1answer
68 views

Drop IP fragments of a certain protocol

When conntrack is active, the iptables stack never sees a fragmented IP packet, only the reassembled one (source), so the -f test never matches. If I want to block any fragment I could set ...
0
votes
1answer
94 views

iptables FORWARD rule

I'm running 3 virtual machines with Fedora 19. The machine B is set up with two networks adapters and provides que channel between machine A and machine C. The machine A IP is set to 192.168.1.1 and ...
0
votes
3answers
246 views

Can't ping after ip change

I'm running 3 virtual machines with Fedora 19. The machine B is set up with two networks adapters and provides que channel between machine A and machine C. The machine A IP is set to 192.168.1.1 and ...
0
votes
3answers
110 views

iptables rule to block traffic not specified in all other rules

Is there a way to add a rule in iptable to block traffic not specified/covered in all other rules ? I know that we can use ! to block specific ports and ip addresses but there are just too many rules ...
1
vote
0answers
65 views

Define IPTABLES rule

I am working with a linux based UTM appliance and have some disagreement with the client on the operation. THere is a standard GUI to configure port forwards in the firewall but for some reason he ...
1
vote
1answer
212 views

Adding a custom SSH port to Ubuntu 12.04 LTS through UFW

I am trying to configure a Ubuntu 12.04 based VPS and I have changed my ssh port from 22 to 803 and everything worked fine. After this I've installed UFW and now I can't login using SSH. Before I ...
0
votes
1answer
108 views

CentOS 6 service iptables panic

me and my friend were doing some firewall configs and in the meanwhile he thought it was a good idea to type "service iptables panic". Now we cannot put the firewall back on the original state ...
1
vote
0answers
213 views

iptables load balancing for TLS with request routing on the same connection

I am trying to set up iptables rules for TLS connection. I have three internal IP in my machine and I route requests coming on public IP at port 443 to each of these internal IP in RR. -A PREROUTING ...
0
votes
0answers
60 views

Let everything except SSH/VPN use a VPN-Connection, but keep SSH working

Given the latest revelations about the size of Internet surveillance, I decided to route all my traffic trough an out of country VPN. I set the OpenVPN client up on my Router (Asus RT-N56U using ...
1
vote
1answer
137 views

Disable SSH remote tunneling

I need to restrict SSH tunnel functions. Users should not be allowed to create remote tunnels but only tunnels to localhost. I tried to setup the whole thing in the SSH configuration but I can only ...
1
vote
0answers
81 views

nc connection refused even on loopback

I'm working on an embedded linux system, which appears to be networked correctly and is running ssh (dropbear) and rpcbind. I'm setting up a server application on it, and every single thing I try ...
2
votes
2answers
843 views

How can I port forward an LAN port to a WAN Ip with iptables?

Using iptables on my router (dd-wrt), I'd like to forward requests to the router on port 64738 from the LAN to an IP (192.168.10.14) on the WAN. This is the opposite of the norm (forwarding a request ...
2
votes
1answer
1k views

How to allow FORWARDing with firewalld on a Fedora 19 router

I've just installed Fedora 19 and I'm using firewalld instead of iptables, but I'm having difficulty interpretting the new terminology. I have 2 NICs. One is specificed ZONE="internal" and the other ...
0
votes
1answer
89 views

iptables as a proxy

I'm not sure how to start better so i'll be straight. I have to travel to a foreign country, but i need access to a server that is local to my hometown network. I have a DD-WRT router with only my PC ...
0
votes
2answers
100 views

Server can't be accessed

I have a server I rent from OVH and I rebooted it and now I can't connect to it, OVH responded with "The server has started (login is requested on the screen) but inaccessible by the network (not ...
0
votes
0answers
1k views

Using iptables to give an LXC container a routable IP

I'm using Docker to manage LXC containers. At the moment Docker configures the underlying LXC container with host-only routing and then uses iptables/DNAT to punch holes into the container, making it ...
0
votes
2answers
59 views

port based nating with iptables

on eth0 port we have public ip and eth1 we have ip 10.31.0.1 which provides dhcp and squid service.Port 8080,53,67,80,443 is open.Now for an application we have to open 1521,8443 port so that it can ...
0
votes
0answers
43 views

Libnetfilter code not working on a virtual machine

I am writing a code using libnetfilter_queue. For those who don't know, this library provides me the capability of accessing network packets in the userland. In the userland, I am doing certain ...
0
votes
0answers
84 views

Multiple eth0 addresses (aliases) and TCP source address

My eth0 card has several aliases from the same subnet (Load Balancing software) and eth0 IP is set as leading to default gateway on this host. I have an application that listens only on eth0:5 on ...
0
votes
0answers
40 views

Sniffing data on uClinux local loopback

I am looking for a way to monitor/sniff local loopback traffic inside a uClinux embedded device. I have several processes that communicate via the local loopback and want to capture this traffic on an ...
0
votes
0answers
225 views

Can't telnet: TCP connection doesn't get established

I am having issues with telnet from a machine. TCP connection is not getting established. SYN gets sent out and SYN_ACK comes back but not sure why the ACK is not getting sent back. I am guessing ...
1
vote
2answers
864 views

CentOS 6.4 and alternate SSH port not working

I've got a CentOS 6.4 machine and would like to change the default SSH port, and followed these instructions: CentOS Wiki After making those changes (including the "semanage port -a -t ssh_port_t -p ...
0
votes
0answers
827 views

Forwarding RDP connections with iptables

I have a workstation that runs Windows 7 as the host, and Ubuntu Server 12.04 in VMware on a bridged network. Both have their own static public IP address. However, I only have one hostname to work ...