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

0
votes
1answer
32 views

IPtables GeoIP libxtables

I was about to install geoip module for iptables. Installation goes fine until I checked the module. It says: iptables: match "geoip" has version "libxtables.so.10", but "libxtables.so.11" is ...
0
votes
0answers
14 views

Creating a Guest WiFi interface on Banana Pi, where devices on other interfaces can't reach each other

I have a Banana Pi I'm trying to use for a Guest WiFi network; What I'm trying to achieve: Pi forwards traffic eth0<->wlan0 Desktop can't contact Guest1, and the other way around. Guest1 can't ...
0
votes
1answer
17 views

Using iptables, set up NAT for a specific range on a local bridge

I'm trying to get a NAT setup for a specific range of IP addresses. I run a QEMU/KVM hypervisor with a local bridge that has ip range 10.0.0.0/8. On that bridge, I have several IP ranges for different ...
0
votes
2answers
18 views

Redirect web traffic to local server

I saw this pair of commands: iptables -t nat -A POSTROUTING -j MASQUERADE iptables -t nat -A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.42.1:3128 iptables -t nat -A ...
3
votes
2answers
4k 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
2answers
133 views

Forward HTTP access to another IP address in iptables

Hi I am using my local internet provider whenever I visit any page and when I look at a source code of the page there is a script injected into code ...
0
votes
0answers
21 views

Configure iptables to keep source address on port forwarding

I want to set up a simple NAT port forwarding rule: external host <-> router <-> server When the external hosts connect to the router's public IP on the forwarded TCP port, a connection ...
0
votes
0answers
16 views

dnsmasq not picking up requests

I recently bought a new smart TV and I'm trying to proxy all requests from it through my laptop. My setup is this: [TV] -> ethernet cable -> (enp0s25)laptop -> router -> internet My TV is connected ...
0
votes
0answers
24 views

Linux: Guarantees by traffic shaping using tc

I am using tc and iptables to limit the bandwidth of port 5000. However, I notice that even though the bandwidth reduced, it is highly variable. What are the guarantees of traffic shaping and ...
0
votes
0answers
13 views

UDP Forwarding redirection keeping source info in Linux

I would like to do an UDP Forwarding redirection of traffic in machine B, so UDP traffic from machine A would go to machine C. I have used iptables and that goes fine. The problem I have is that I'm ...
0
votes
0answers
14 views

How to direct traffic based on destination PORT to different interfaces in Linux?

I want to send http[s] i.e. destination port 80,443 traffic through interface1 and rest all traffic through interface2 (which are two different ISPs) and should receive the packets as well. The issue ...
0
votes
0answers
45 views

LINUX: Limiting bandwidth of a set of ports

I want to limit the bandwidth (send and receive) of a set of ports. Upon reading few resources online (Link1, Link2), I realized that I need to use tc and iptables to do this. So I am using the ...
1
vote
2answers
47 views

Forward IP of IP camera from eth0 to wlan0, on the same linux machine

I have a linux machine with 2 network connections, wlan0 and eth0. Through wlan0, the linux machine is connected to the router, and through eth0, the linux machine is connected to the IP camera (via a ...
0
votes
1answer
63 views

How to manage my firewall with new Centos's utilities?

I just installed a Centos7 distribution on my server. I came from Centos6, and I read that iptables utility has been replaced by firewalld and services utility by systemctl. So I try to get my ...
0
votes
0answers
16 views

How can I duplicate traffic with iptables v1.3.5?

I want to duplicate all traffic and send it to my computer over cable to see what is my computer sending over wifi (it probably sends corrupted packets, because sometimes it jams all computers ...
1
vote
0answers
2k views

udp client sending ICMP “port unreachable” when receiveing messages from the server

(Note: I moved this question from StackOverflow, because it's to be considered off-topic there, better fits here, and still unsolved) I have a udp client using luasocket, basically doing this (with a ...
0
votes
0answers
32 views

How should I configure my Linux kernel (running on armhf architecture) if I want to use the NAT-table in iptables?

I successfully compiled a Linux kernel (version 4.4) with nat support for my desktop computer that runs on a x86-processor. Now I want to do the same for my server which has an ARMHF processor. The ...
0
votes
2answers
645 views

UFW default rules… where are they?

In the tutorial on UFW here https://help.ubuntu.com/community/UFW it says that UFW uses the default rules if enabled and not configured. I checked the folder: /etc/ufw/ and the files I found ...
1
vote
1answer
43 views

Layer-2-Accessible DMZ: ebtables?

I'd like to make a network topology where all the IoT devices (printer, DVR, thermostat, BluRay player, etc) are all in a DMZ and the rest of my devices are all on the LAN. Note that the usage of DMZ ...
0
votes
1answer
53 views

iptables - kill established NAT connections

I have the following setup: PC eth0 connected to GW eth1 GW eth0 is connected to the internet. GW has net.ipv4.ip_forward=1 in sysctl.conf So, when I simply run (in GW): iptables -t nat -I ...
0
votes
0answers
28 views

Sharing internet connection from USB0 to WLAN0

I want to create a wireless AP from my kali linux machine to share internet connection to other devices. Internet connection to linux is given by USB tethering using an android mobile phone. There is ...
0
votes
1answer
102 views

Port forwarding to VPN client

I have a router on Tomato (shibby) running an OpenVPN server (with TAP; interface is tap21 on the router). Various resources (including some workstations) are physically connected to eth0 on this ...
0
votes
0answers
8 views

Packet is getting dropped even though iptables rule allows forwarding

I configured the following on CentOS to enable IP forwarding but limit to specific IP range(destination): iptables -D FORWARD -i eth0 -j ACCEPT #delete default ACCEPT rule iptables -P FORWARD ...
1
vote
0answers
44 views

Raspberry Pi iptables not working without active eth0

I just work on a AcessPoint, hosted from my Raspberry Pi B+. When a cable is plugged in on the eth0 adapter it all works fine. If someone connect to my AP, they will be redirected to the webserver, ...
4
votes
0answers
3k views

Route outgoing VPN traffic through local transparent proxy

I have a Digital Ocean droplet (similar to an Amazon EC2 instance) running Ubuntu Server 12.04.3 x64 with both strongswan 5.1.1 (built from source) and squid 3.4.2 (also built from source) installed. ...
1
vote
0answers
21 views

DD-WRT Router and Squid3 transparent box denying everything

As the title implies, I have a DD-WRT router that I use for the wi-fi network. What I want is to have my wi-fi traffic sent to my squid box so that I can monitor what is being sent over the wi-fi ...
0
votes
0answers
70 views

hostapd cannot set channel for Kernel driver

I try to setup a Raspberry Pi as a router following the tutorial given here. OS is Raspbian. ifconfig gives: eth0 Link encap:Ethernet HWaddr b8:27:eb:b2:e9:eb inet addr:192.168.178.46 ...
0
votes
3answers
582 views

How to block network traffic on ubuntu gateway via arp table

I have a network with 80 PC and a ubuntu 12.04 as GW. For security reason I want to limit the Computers connected on this network using an ARP precompiled table. In other words I want a tool that ...
1
vote
0answers
57 views

iptables - NAT/PAT rules for HTTPS, HTTP, RDP, SSH

I'm trying to set up a gateway/router box and can't seem to get my iptables quite right. The goal is to have a private network of windows boxes that can talk to WAN for HTTPS, HTTP, and SSH. I want ...
1
vote
0answers
39 views

How can I use Ubuntu as a gateway into a remote LAN?

I need to be able to access whole remote subnets from a Windows PC. Here's my network layout: I -{MyLAN: 10.77.77.0/24, DHCP}--[Ethernet: 10.77.77.64] N (Windows 10 ...
1
vote
1answer
18 views

MedaiWiki server publicly inaccesible on Raspberry Pi

I'm having trouble publicly accessing a MediaWiki server that I have set up on my Raspberry Pi. I am getting a "connection timed out" error when trying to visit the server remotely. It is however ...
0
votes
1answer
197 views

Failover on voyage os using eth0 and ppp0 interfaces

Hi I am having problem for failover handling on voyage os. I have a system with eth0 and ppp0 interfaces where eth0 is primary and ppp0 is a secondary path for traffic. root@voyage:~# route -n ...
0
votes
0answers
23 views

How do I forward/NAT all traffic to one interface to give internet acess for clients in ap?

I am trying to set up a router in my debian vbox virtual machine using an usb wireless adapter in at0, and a bridged adapter in eth0, I'm using airbase-ng and isc-dhcp for leasing IPs. The point is ...
0
votes
0answers
28 views

nfqueues and arp spoofing iptables

I am ARP poisoning and DNS spoofing my home network for learning purposes. When I get the victim to send their packets to my attacking computer, which rule do I have to create so I can intercept the ...
0
votes
1answer
33 views

How to configure a intranet router to inform its hosts about routes to other subnets?

It sounds a little bit strange, but the current network configuration is, I have two local networks: 192.168.7.0/24 and 192.168.144.0/24. Their gateways are respectively 192.168.7.1 (R1) and ...
0
votes
1answer
59 views

iptables routing of wlan0 to usb0 and usb1

Server: wlan0 (WAN) - 192.168.0.17 usb0 (LAN) - 192.168.2.15 Client: usb1 (LAN) - 192.168.2.2 wlan0 <-> usb0 <-> usb1 How do I configure a NAT to share my wlan0 internet access to my ...
0
votes
0answers
17 views

EVIL AP - Internet connection bridging issue

I've been trying to create an EVIL AP scenario in my test lab for a couple of days, but I always face the same issue. I can connect to the WIFI adapter and I receive an IP address etc, via dhcp. ...
0
votes
2answers
39 views

Ping between two Linux systems via an intermediate Linux fails

I have a simple network with three Linux systems running CentOS 2.6. Linux 1 (eth1: 192.138.14.1/24) | | (eth4: 192.138.14.4/24) Linux 2 (eth2: 192.138.4.3/24) ...
1
vote
0answers
600 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
1answer
125 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 ...
1
vote
0answers
64 views

rp_filter not working, still get martian errors and dropped traffic

I am using the below commands to setup test environment for traffic flow. I am using a bash shell for traffic source but would eventually be VM or container. I don't understand where the traffic is ...
0
votes
0answers
16 views

Routing between interface and OpenVPN tunnel

I have two NICs: ethernet and wi-fi. I configured an OpenVPN tunnel with route-noexec option, so the computer still uses ethernet connection by default. Now, I want to make an AP with my wi-fi card. I ...
0
votes
1answer
93 views

IPTables forward port to another ip:port but keeping original source ip

I have following iptables rules on gateway machine(192.168.0.1). I want to forward port 192.168.0.1:80 to 192.168.0.2:8080. But I need to maintain original source ip so that original server can get ...
0
votes
0answers
68 views

How to redirect a device connected with my wifi hotspot to a localhost page

How do I redirect a device connected with my wifi hotspot to a localhost page (for example login form) Ubuntu 14.04 LTS? I tried many rules earlier suggested but no one works? Plz suggest step by ...
0
votes
0answers
13 views

Ubuntu IPTables

I started hosting my game-server on Ubuntu Linux 14.04 I am having an issues ، some enemies/bug abusers log in 2+ characters in the same second then they spam a certain spell/word that lags/stops my ...
1
vote
1answer
85 views

Using iptables to redirect all traffic to local webserver

Aloha, I'm trying to redirect all traffic on my wifi router to a local webserver using iptables. I'm not sure i have got the command right and also I want to exclude the router IP (172.16.0.1) from ...
0
votes
1answer
28 views

How can I allow traffic to certain web address but restrict all other in linux

I want my linux (ubuntu 14.04 , 64 bit) system device which has a 3g card in it to have restricted access of internet . I want to build a scenario where if the card is active, the system should be ...
0
votes
1answer
54 views

Iptables: why my redirection doesn't work?

Linux slackware,i have put ftp server with unprivileged user running port 2121. Want to redirect all packets from 21 to 2121 so my ftp is avaliable as standard without specify the port. telnet host ...
0
votes
1answer
35 views

dnsmasq different replies based on source

I want to override the DNS configuration for some domains by using dnsmasq so that queries are forwarded elsewhere to be resolved. I can do this with this configuration snippet: ...
0
votes
1answer
7 views

iptables - Add additional allowed IPs

This is what I have used as reference: http://unix.stackexchange.com/a/145933 So if I do: iptables -I INPUT -p tcp -s MY IP --dport 21 -j ACCEPT iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 21 -j ...