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
2answers
94 views

How do I forward eth0 to wlan0?

I tried to forward eth0 to wlan0 on my Raspberry Pi B+ using NAT on iptables with the following commands: echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A FORWARD --in-interface eth0 -j ACCEPT ...
0
votes
1answer
69 views

OpenVPN Routing Port 80 Traffic only DD-WRT

I've setup openvpn client on my dd-wrt to connect to a host a couple states away. Works great(checked route table as well) but I want to only tunnel http traffic. I've always used IPtables for my ...
1
vote
1answer
90 views

IPTABLES Rules to rate-limit ICMP(Ping) traffic to 5 packets per second

Trying to figure out the IPTABLES rule for above mentioned requirment. Can anyone please advise me here. I was trying this but not succesful - iptables -A OUTPUT -p icmp -m limit --limit 5/second -j ...
-1
votes
1answer
29 views

How can i open port for microsoft outlook

I use firewall and configure iptables command to block all torrent port in my firewall with iptables. When I add these rules, I can't send and receive email with my outlook with my exchange server in ...
0
votes
0answers
24 views

How To Setup a Firewall in Ubuntu 14.04 LTS

I have to set-up an Apache web server on Ubuntu 14.04 LTS and a Firewall Server on Another Ubuntu 14.04 LTS . My question is that how to connect firewall server to the next web server after installing ...
0
votes
1answer
36 views

Using iptables to bypass VPN based on user

Running the latest LTS Xubuntu and am trying to route traffic from processes initiated by one user (let's say 'jsmith') around a VPN. I think iptables is my only hope here? The relevant adaptors are ...
0
votes
1answer
47 views

Why can traffic be routed to Privoxy but not Tor using Iptables?

To route http-requests from Interface 10.10.0.0 over privoxy this iptables rule is enough: iptables -t nat -A PREROUTING -s 10.10.0.0/16 -p tcp -m multiport --dports 80,8080,81 -j DNAT ...
1
vote
1answer
35 views

Access linux device through bridged interface

I'm currently trying to set up a device with a bridge in my network. The device used for the Bridge has two eth interfaces and a wlan interface. I managed to create the bridge from eth1 to wlan0. The ...
2
votes
1answer
64 views

No connection between devices in local network

I have home server that also works as router (gateway). It has 2 interfaces one for internet (enp4s0) and another (enp4s1) looks into local network. All devices from local network uses internet from ...
0
votes
0answers
16 views

Run script after Suricata drops or alarms

I have a Suricata IPS. I want after droping some packets, block their IP in my other servers. I have the command needed to block them. I just don't know how to parse new lines at fast.log and ...
0
votes
0answers
18 views

Problems with routing/firewalling with L2TP / IPSec

I have racoon configured for VPN along with L2TP (PAM auth), and I plan on using this for multiple users. My racoon.conf is: path include "/etc/racoon"; path pre_shared_key "/etc/racoon/psk.txt"; ...
3
votes
1answer
42 views

Iptable & routing in a virtualbox lab

I set up a virtual box lab, with the following configuration: Vitual Lab Setup In order to make the lab working i create with a script the following interfaces, enabling port forwarding for the ...
0
votes
0answers
23 views

meaning of iptables -vL output

I ran the following commands: iptables -Z nmap 192.168.111.142 iptables -vL And I got this: Chain INPUT (policy ACCEPT 29 packets, 1484 bytes) pkts bytes target prot opt in out ...
0
votes
0answers
29 views

Transparent proxying for all docker containers

I'm running docker containers from behind a corporate firewall and it is always problematic that I have to set the proxying parameters in each container. This is especially bad when I run builds from ...
1
vote
1answer
82 views

Cannot access internet with current OpenVPN configuration

I am trying to get an OpenVPN server working on my Raspberry Pi. The Raspberry Pi is running Arch Linux with OpenVPN version 2.3.8-2. I'm currently able to connect to the server from the Android ...
3
votes
0answers
108 views

Why do different users get different IP via the same interface

On the same server, on root, I am getting the correct internet ip of the interface root@server:~# curl -s --interface ppp0 ipcheck.com 111.111.111.111root@server:~# However... If it's not super ...
0
votes
1answer
53 views

Is there any other way to get IPTables to filter IP addresses based on geolocation in Ubuntu 12.0.4.5 (LTS)

So a few of the servers I manage are being slammed by traffic from China when the sites themselves would have utterly no appeal to anyone in China in any way. To make things worse, lots of unwanted ...
1
vote
1answer
221 views

Ubuntu IPTables allow only allow 1 country

So I've been looking around on the net for a script that will drop all traffic to all ports except the http(80) and https(443) ports, and then only allow traffic on all other ports from country x ...
1
vote
0answers
39 views

Setting up RTMP for streaming (Console)

So I have been trying to set this up for the past few days and I am having so much trouble actually getting this to work. I have installed Nginx with the optional RTMP module onto my Mac and I also ...
1
vote
2answers
75 views

does IPTABLES as a router always require masquerade / SNAT?

If I set up a linux box as a router behind a DSL gateway, do I need to enable masquerading or SNAT? Logically I would assume that all I need to do is enable ip_forwarding (done) but traffic to ...
0
votes
1answer
1k views

Fail to start iptables.service: 'No such file'

I'm trying to directly use iptables instead of firewalld to manage firewall rules. However systemctl start iptables prints: [root@centos-new ~]# systemctl start iptables Failed to issue method call: ...
0
votes
1answer
51 views

How to I configure iptables for both IP masquerading and firewalling at the same time?

I have a host that acts as a gateway for routing a home network to Internet. IP Masquerading has been enabled for months now and the system has worked fine. How do I configure it to function also as ...
0
votes
0answers
26 views

iptables wont take any arguments

I have an ubuntu server configured as a gateway router with eth0 (ext connected to a dsl router) and eth1 (internal network) I have Source NAT enabled, to share the external IP with all internal ...
0
votes
1answer
19 views

Iptables issue error at line 2

I messed up with my ip table now i am facking some kind of issue with that iptables to start.Below content is present in my iptables file. But when i try to start the ip tables i am facing error as ...
0
votes
0answers
56 views

iptables-restore failed at COMMIT line, no detailed description

I'm trying to setup iptables (using iptables-restore) for a new server and was looking at the security docs from Linode, so basically used their templates for IPv4 and IPv6. These are both failing at ...
0
votes
0answers
32 views

Disabling incoming traffic on an interface

I have an embedded device, which uses iptables v1.2.11 for packet filtering. The device has two interfaces eth0 and a mobile channel ppp0. My goal is to disable all incoming traffic (to any listening ...
0
votes
0answers
19 views

Is it possible to route all traffic to a vpn except multicasts?

I am using a router with tomato firmware installed. My lan includes a tv, eg ip 192.168.0.2. The tv receives multicast broadcasts from an iptv provider, but can also access the internet to view ...
0
votes
0answers
36 views

Allow access to camera only by one IP - tomato

I'm running tomato shibby 1.2.8 on an ASUS router. I have a camera in my network, which has the IP 192.168.1.222 (static IP). I would like to block all connections to this IP, where the source is ...
0
votes
0answers
19 views

How does IPTables console logging effect network packet drops?

How does console logging effect network packet drops? I am asking because I have iptables running with logging option and it logs packets to /var/log/iptables. I didn't configure --limit option in ...
0
votes
0answers
147 views

Setting up Raspberry Pi as router with multiple interfaces on same subnet

Backstory: My college doesn't allow for multicast/zeroconf/upnp on their network (and understandably so, since there are way too many devices on the network). As a result, I'm trying to use my ...
2
votes
1answer
264 views

Two NICs on the same subnet but with different networks?

Description This is similar to this question, but different: Linux computer has two NIC. eth0 is statically assigned with an IP. eth1 is assgiend by personnel in the field which could be same IP or ...
1
vote
0answers
28 views

Problems with opening ports on Linux

Basically I have tried every tutorial I could find but I can't seem to open a port in a Linux VM. I tried downloading gufw and opening a port there; didn't work. I disabled gufw; didn't work Set a ...
0
votes
0answers
8 views

IPtables restrictions and OpenVPN

So, my friend has a virtual machine that runs linux and an OpenVPN instance. He wants to restrict all IP addresses except for address of an OpenVPN instance. The idea is, not to let anything to ...
0
votes
0answers
36 views

Unable to remove port 22 from firewalld

I am running a VPS that i have gone and installed firewalld on, on this box, the service comes by default with port 22 open so that you can still gain ssh access. I have manually changed the SSH ...
0
votes
0answers
81 views

Can't reach server, using external IP from internal network

I have a Raspberry Pi 2, running Raspbian and using as a wireless VPN router. I'm a beginner with networking, but successfully set up masquerading to VPN's tap0 interface and allowing forwarding ...
0
votes
2answers
55 views

With iptables how to route traffic from virtualbox internal adaptor to eth0 interface?

i was learning iptables a bit deeper and things were going good but i am confused with using DNAT, SNAT and MASQUERADE, i was doing paractice with them and couldn't find a way to simply route traffic ...
0
votes
0answers
25 views

filezilla not connecting even with required ports opened

Server: Ubuntu 15.04 - 2.6.32-042stab094.8 Client: Windows 10 I did some iptables changes, saved all rules, naturally, reapplied them afterwards, summary of changes are: open ports tcp: 20, 21 ...
1
vote
1answer
39 views

Port 80 forward on home router

I have a generic Linux home router. I can change iptables on it by telnet to console. Currently, it is set up to forward all incoming connections to machine on my internal network, using something ...
1
vote
0answers
93 views

tomatousb - Allow only specific IP to connect to other IP port

I'm using tomato shibby on a router, and I'm trying to set some specific rules using iptables to set the following: I have a server, which runs on 192.168.1.2 (LAN) port 2232. Everybody from the LAN ...
0
votes
0answers
44 views

SSH Connection Refused : Wrong conf

I am trying to harden my SSH configuration. In addition to modify sshd_config file, I added some iptables rules. Here are the common ones: # Default policy iptables -P INPUT DROP iptables -P FORWARD ...
0
votes
1answer
170 views

TCP connect: No route to host

I started a tcp server on a host A and then start a tcp client on another host B. Both hosts are in the same LAN via the wireless router at home. the tcp client tries to connect to tcp server on port ...
0
votes
0answers
25 views

Local host's iptables dropping packets even though router firewall only forwards one port

I have a computer on a small WLAN that is connected to the internet via a router. The router has firewall software and I have set up the router firewall to forward port 1234 and only port 1234 to my ...
1
vote
1answer
37 views

Connect to wifi while hosting AP on another iface

I have two wireless interfaces. wlan1 and wlan0. And I want to host some Access Point on wlan1 (airbase-ng and isc-dhcp-server) and redirect packets from access point interface(at0) to wlan0 which ...
0
votes
0answers
21 views

How to fail fast with iptables?

Inspired by the Pi-hole I set up my own one. What it does: The Pi-hole is configured as a dedicated IP in my local net on a virtual adapter of Raspberry Pi. Get list of known spam / phishing / ad ...
1
vote
0answers
40 views

iptables SNAT target and TCP ACK packets

I need to establish a TCP connection where the client is spoofing its IP for all outgoing traffic. My first attempt was to add a rule to the POSTROUTING chain like so: iptables -t nat -A POSTROUTING ...
1
vote
1answer
842 views

using firewalld and firewall-cmd how to add-rule to primary INPUT chain not INPUT_direct

so after reading the firewalld man page and fedora documentation, I have come to the understanding that to add a custom rule to firewall with specific arguements i need to use the structure ...
0
votes
0answers
251 views

IPTables NAT and virtual interfaces

I have 2 VM's running CentOS 7 with the following ifconfig configurations: VM1: ifconfig eth0: public ip eth0:0: LAN IP 172.22.xx.x1 VM2: ifconfig eth0: no public ip eth0:0: LAN IP 172.22.xx.x2 ...
0
votes
0answers
93 views

Opening the Postgresql port

I'm trying to connect to a Postgresql server from a remote computer using: psql -U dbuser -h [host address] But I get the following error: psql: could not connect to server: No route to host Is ...
0
votes
0answers
15 views

Hostapd does not process HTTPS trafic from ppp0

I setup router server with hostapd 2.3 which works perfectly with eth0 -> wlan0 configuration. But if I'm switching config to ppp0 -> wlan0, then clients connected to wlan0 can access only to HTTP ...
1
vote
1answer
515 views

Squid 3.3 Transparent IPv4 and IPv6 Proxy with TPROXY

I'm attempting to change my Squid transparent setup from using generic NAT that's limited to IPv4 only and switching it to TPROXY, for IPv6 support. I'm having difficulties getting transparent clients ...