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
62 views

Make application use specific network interface

I have an openvpn connection and I need it to work only for one application, this app uses an specific local port. I used route-nopull on my openvpn config file and then: ip route add default via ...
1
vote
1answer
23 views

Filtered port with virtual server setup on a NAT

I have a Symphony SY602 ADSL router and I want configure a dynamic DNS to access my system remotely. I made a NAT virtual server in routers configuration and this is what I configured: Server Name ...
0
votes
1answer
32 views

enable internet on openvpn tun - azure linux

I am trying to do this with OpenVPN TUN on an Azure Linux instance: -=Android Client=- --> -=VPS=- --> -=Internet=- Client connects but no internet access. Iptables commands iptables -t nat ...
0
votes
1answer
25 views

Why does iptables port aliasing work with only a single rule?

I have a service running on a particular port, but in order to make it accessible via a more memorable port as well as the normal port, I added an iptables rule that acts as a port alias: iptables -A ...
4
votes
3answers
2k views

Block a user from accessing internet on Linux

How do I block a user from accessing the internet under Linux? I'm trying the following: iptables -A OUTPUT -p tcp --dport 80,443 -m owner --uid-owner $USERNAME -j DROP Is that the right syntax or ...
0
votes
0answers
12 views

Linux: Can user applications generate icmp messages?

I am using TOR and setting up a transparant proxy depending on users. I had trouble to constrain ICMP messages on UID. But I found an explanation for that on server fault. For the sake of privacy: is ...
0
votes
0answers
34 views

Open firewall port on Mac OS X

I need to open port 8181 on my Mac OS X. On Linux, I would do: iptables -t filter -A INPUT -p tcp --dport 1664 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 1664 -j ACCEPT How do I do this ...
0
votes
1answer
17 views

Can't connect to Monet DB hosted in RHEL5

I'm not a sysadmin, much less a RHEL sysadmin, but for some reason I have to make a few config changes in a couple RHEL servers. I have to set up a couple services in different RHEL servers and they ...
2
votes
1answer
1k views

Bandwidth limit by Port on iptables

What iptables function would I use to bandwidth-limit all traffic on port 566 to 2KB/s? I'm confused about exactly how to do this.
1
vote
0answers
336 views

Intermittent disconnections when using OpenVPN over SSH tunnel; possible iptables issue?

I've recently set up a Debian Wheezy server with OpenVPN to help out some friends in areas where internet censorship is a problem (including the blocking of VPN traffic in general). To overcome this, ...
0
votes
0answers
13 views

MASQUERADING a veth

I want to bind an application to a wifi interface that might loose connection and receive a new DHCPed IP on reconnect. The problem is that the application can only be binded to an IP address and not ...
0
votes
0answers
20 views

Why am I getting “FATAL: Ident authentication failed for user ”root“” after changing rails server to port 81

I was running my rails app on the default port of 3000. I opened port 300 with: sudo iptables -A OUTPUT -o eth0 -p tcp --sport 3000 -m state --state ESTABLISHED -j ACCEPT and sudo iptables -A ...
0
votes
0answers
27 views

How do I share my wlan0 internet connection to eth0 using command line and config files?

I understand how it is done using the GUI (1, 2, 3), but I need to do this manually using Linux tools/commands (iptables, eatables ...). What are the configuration steps and commands to use, ...
0
votes
0answers
9 views

SSH tunnel data from hostapd server to remote server

I've set up a small raspberry pi with hostapd to be a wireless access point. I'd like to have all connections from it ssh tunneled to a server in another country. I'm not overly sure how I'd do this, ...
0
votes
0answers
36 views

Route all packets on port 80 from inside a vm to kali linux on another vm

I'm trying to route all packets on port 80 to kali linux so that I can ssl strip them but I cannot see to setup the iptables correctly to force all the packets to go to my other Vm. [ Virtual Machine ...
0
votes
1answer
35 views

iptables on debian blocking git pull, http api requests etc

I am using IPTables on an API server to block all incoming traffic except for SSH, HTTP and HTTPS. I need to have full access on the loopback interface to run beanstalkd amongst other things, and need ...
1
vote
1answer
121 views

How to force Google safesearch on entire network

I've a problem filtering web searches on Google domains. Currently I've a linux openVPN Server running with openDNS "family block". I can block a lot of websites with dangerous content and it's ok. ...
0
votes
1answer
63 views

No internet through OpenVPN

I am having trouble with my OpenVPN setup. I have a Linode box with an OpenVPN server installed on it and I managed to get Tunnelblick to establish a vpn connection from my mac. I followed this guide ...
1
vote
1answer
2k views

Forward connections on 0.0.0.0:80 to 127.0.0.1:9091

I'm trying to set up a tor-relay. In order to allow tor to present a static web page explaining what it is I want the server to listen on port 80 and 443. In order to allow tor to use ...
0
votes
1answer
55 views

Why my iptables configuration for port-knocking does not work?

I implemented the following iptables rules on my test server for a course. The firewall shuts down and I cannot access port 22. However, after knocking on the ports 1111, 2222 and 3333 in that order - ...
1
vote
0answers
134 views

Segregating/Separating a device (ATT 3G Microcell) from internal network without using DMZ

I would like to put the ATT 3G Microcell in an isolated network from a network that has the rest of my devices, by which I mean I want the ATT 3G Microcell to only be able to access the Internet, but ...
1
vote
2answers
82 views

Iptables rules to only whitelist SIP providers

I have an Asterisk box sitting behind an ADSL router/modem. There are no other services on the Asterisk box, just telephony. I am getting a lot of traffic which I think are SIP probes. I've ...
0
votes
0answers
340 views

OpenVPN won't connect from remote location

I set up OpenVPN on a linux machine in my basement. I'm able to connect from my Windows 8.1 machine without an issue when I'm connected to the local network. In this instance, I set the config file ...
2
votes
2answers
3k views

iptables gives me the error “can't initialize iptables NAT”

I am trying to use iptables and it is giving me the following error root@vikkyhacks:~# iptables -t NAT -L iptables v1.4.18: can't initialize iptables table `NAT': Table does not exist (do you need to ...
0
votes
0answers
14 views

iptable definitions for routing and defence

I'm attempting to configure a firewall on my laptop that allows for routing. The main trick is, I don't want to allow for connections to be made that do not fall under the ESTABLISHED,RELATED ...
3
votes
2answers
5k views

Deny all incoming connections with iptables?

I want to make some simple iptables rules to deny all incoming connections and allow outgoing. How can I do that?
0
votes
0answers
43 views

Port mirroring without TEE

I have a home router running OpenWRT 12.09.1. The package list for this version does not have iptables-mod-tee. I am familiar that I could set up a port mirroring using: #-A POSTROUTING -t mangle -o ...
0
votes
1answer
23 views

Trying to configure iptables on Slackware 10

I am trying to configure iptables on a Slackware 10 machine. This Slackware version is required in my class - so I cannot upgrade it. After compiling it, I want to configure iptables - however, it ...
0
votes
1answer
64 views

Conntrack gets incorrect forwarding rules for outgoing protocol 41

I'm trying to forward protocol 41 (ipv6-in-ipv4) for an HE tunnel through a WRT54G running Tomato 1.28. Tomato 1.28 is running a 2.4 kernel that knows absolutely nothing about protocol 41, except that ...
1
vote
1answer
127 views

allow incoming ssh with openvpn client

I have set up an OpenVPN client on my home router. The moment the tunnel goes up, I can no longer ping my router from the internet using its WAN_IP. I would like to allow certain incoming connections ...
0
votes
1answer
60 views

Using IPtables to redirect IP address range to port range

I'm trying to set up an IPtables rule that will forward all packets to a /22 range to a single IP and port for debugging purposes. Based on the question here Using iptables to redirect ip address I ...
1
vote
2answers
2k views

unable to connect to localhost:80 after installing nginx

I just installed nginx by doing sudo yum install nginx and I'm unable to connect to it on port 80. I tried stopping iptables by doing sudo service iptables start and was still unable to connect. I'm ...
2
votes
1answer
62 views

Iptables redirecting

I have set up a Personal hotspot using Hostapd. But this hotspot is not connected to the internet but I do have Apache installed on it. What I am trying to achieve is to redirect all the clients (that ...
2
votes
1answer
44 views

When writing an iptables save file by hand, how does one calculate the packet-counter and byte-counter values?

I am attempting to write a 22MB iptables rule-set file, the very kind that is generated with the iptables-save command, except endlessly long. Understandably, this takes a prohibitive amount of time. ...
0
votes
1answer
798 views

What do these numbers mean in the output of iptable-save?

In the output of iptables-save # Generated by iptables-save v1.3.8 on Sun Mar 14 19:42:45 2010 *filter :INPUT ACCEPT [328764:37367248] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [324693:28884726] COMMIT # ...
1
vote
0answers
28 views

How can I efficiently filter Dos packets? [duplicate]

I have recently been the victim of some Dos attacks. The facts : I received a very high amount of packets saturating my connection and preventing me from accessing the Internet during one hour ...
0
votes
1answer
83 views

Iptables to forward HTTPS traffic to remote HTTPS proxy

My goal is to use Iptables to take all traffic going to my server on port 443 and forward it to a remote HTTPS proxy server. So basically if I was to use my ip of 192.168.1.142:443 as a SSL proxy it ...
0
votes
0answers
27 views

Open ports for Age of empires in ubuntu router using iptables

The purpose of this question is to learn how to correctly use iptables. As I am currently living in the dormitories in the University and I am using a small netbook as a router to provide wifi in my ...
2
votes
1answer
735 views

IPTables module ip_tables not found for root

We got a custom build Linux distribution from a vendor, which is not shipped with iptables enabled. root@xxxx:~# iptables -L modprobe: FATAL: Module ip_tables not found. iptables v1.4.21: can't ...
0
votes
0answers
24 views

Special type of DMZ?

So I have a standard modem-router setup all great to go, my Modem gives an IP Address from my provider via DHCP according to my Mac address. All is good. However, I now want to expose a new virtual ...
0
votes
1answer
35 views

Set block time with iptables

I have the following rules in ufw, for iptables: -A ufw-user-input -p tcp --dport 80 -m state --state NEW -m recent --set -A ufw-user-input -p tcp --dport 80 -m state --state NEW -m recent --update ...
0
votes
1answer
74 views

Will an inbound iptables rule in ddwrt on port 443 break https?

I want to run a vnc repeater service on my home ddwrt router. Due to the possibility of friends/family asking for support in unknown network environments, I'd like the host-repeater application to run ...
2
votes
3answers
2k views

Limit incoming connections using iptables per IP

I need to limit access to some port per IP. Let's say 5 connections per minute - not more. I've seen iptables recent, connlimit and limit, but all of them are not fitting exactly what I need. ...
0
votes
0answers
35 views

Iptables intercepting traffic

I have 3 servers on the network (Server 1: 10.0.0.1, Proxy server: 10.0.0.2, Server 3: 10.0.0.3) and I would like to intercept the traffic going through the proxy server from Server 1 to Server 3. ...
0
votes
0answers
64 views

Iptables redirection to squid proxy server

I'm trying to setup filtering through a squid proxy however I'm having trouble getting my router to send all traffic to the proxy using iptables. I've currently got it setup such that there is the ...
0
votes
0answers
57 views

Access lxc container services from other lxc containers via host

I've got a laptop with Ubuntu 14 Desktop. The laptop has WLAN connection to my LAN and is managed by network manager. Of cause, the laptop a nic (eth0), too, but it is not connected. I use this laptop ...
0
votes
2answers
138 views

Is it possible to force DNS for certain devices with iptables?

I'm trying to use iptables to force DNS for certain devices (Shibby Tomato on Asus RT-N66U). I haven't found anything online describing such a configuration. The closest I could find was this: # For ...
0
votes
1answer
26 views

iproute2: How do i connect one machine to the internet via another

I have the following setup: A > 169.254.8.125/16 <--(ad-hoc)--> 169.254.9.109/16 < B > 192.168.178.21/24 <--(wifi)--> 192.168.178.1/24 < AP/router > internet I want to connect A to the ...
0
votes
1answer
24 views

iptables - I'm losing control over the box by adding new rule to the config

My set up is the following: Internet uplink (200Mbit) DMZ (1GB ethernet) Internal network (1gb internet) Log interface My gateway is serving around 600 clients with 1400 iptables rules in ...
2
votes
1answer
1k views

Match multiple strings in iptables

I have 2 strings, and i wish to queue the packet if it contains both the strings ( something like ("jsh"&&"gjhyg")), i tried following ways, but they don't seem to work: sudo iptables -A ...