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
0answers
9 views

IPTABLES blocking port 25 even though it's enabled

I'm using centos7 and have the following rules set up: *filter :INPUT DROP [6:394] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [42:6917] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j ...
0
votes
0answers
2 views

OpenVPN on KVM VPS - No ping or network access

I want to use OpenVPN on a KVM VPS and it seems that everything is configured just fine. The connection is getting established with server but I can not even ping 10.8.0.1. IPTables is completely ...
0
votes
1answer
26 views

I cannot connect to a port that is already open in my firewall

I have tried to open port 80 [root@rhel7 docker]# firewall-cmd --zone=public --add-port=80/tcp --permanent success [root@rhel7 docker]# firewall-cmd --reload success [root@rhel7 docker]# ...
1
vote
0answers
10 views

Run Tor proxy before a VPN

I heard people say that running Tor's proxy before using a proxy is safer. How do that accomplish that? Would it be running proxychains with Tor's proxy on top of the list with other proxies? Would ...
2
votes
3answers
4k views

iptables firewall only allows internet traffic if source port of 80 is allowed

I am configuring an iptables firewall, currently just to allow http and https traffic. It is working but under a particularly strange rule - I must allow incoming connections with a source port of ...
0
votes
2answers
1k views

How to use iptables to allow traffic only through ONE SPECIFIC VPN

I'm trying to allow all traffic from my Banana PI running Lubuntu to only go to my LAN or otherwise through an VPN Server. I'm following this guide: ...
3
votes
2answers
50 views

IPTables - Redirect traffic based on country

Is there any way how to allow TCP traffic only from specified countries on a specified port and the rest of traffic redirect to another IP/port using iptables ?
1
vote
2answers
37 views

How do I set iptables so that https://bing.com is blocked, but http://bing.com is not?

-A OUTPUT -d bing.com -j DROP – works: Block bing.com through http and https as well. So I try to modify it so that only https is blocked: -A OUTPUT -d bing.com --dport 443 -j DROP – but this won’t ...
0
votes
2answers
34 views

Why can’t I block https?

May I ask why can I not block all https traffic in iptables? I tried: OUTPUT --dport 443 -j DROP And even: OUTPUT --sport 443 -j DROP None of this works. Https webpages are still perfectly ...
1
vote
0answers
19 views

How to redirect traffic on Raspberry from USB dongle WiFi to local application

Good morning gentlemen, my RPi 2 is a working access point with two WiFi dongles (each with its own range of IP addresses); the RPi is also connected via LAN cable to my modem. It offers the most ...
2
votes
2answers
26 views

Blocking a device from all network traffic, but with specific exceptions

I have a router that runs Tomato, so I have access to iptables. There's a device on my network with an IP address of 192.168.1.100. I don't want it to send data to the Internet except for a very ...
2
votes
1answer
4k views

DD-WRT firewall rule configuration

I'm using DD-WRT on my linksys router. I want to limit each user on my network to 200 connections at any given time. Does anyone know the rules I enter the firewall in DD-WRT admit panel. I tried ...
0
votes
1answer
18 views

iptables whitelist doesn't work while blacklist does

Allowing forwarding for all and blocking a set of ips work: iptables -P FORWARD ACCEPT iptables -A FORWARD -m set --match-set denied_ips src,dst -j REJECT But denying forwarding for all and ...
0
votes
0answers
18 views

UFW Ubuntu NAT with virtual interfaces setup

Trying to setup NAT on a (VPS) virtual private server. Running Ubuntu 14.04. All the guides I see mention using eth0 interfaces in the lines. Example -A PREROUTING -i eth0 -d 25.25.25.26 -j DNAT ...
0
votes
0answers
11 views

In Virtualbox, trying to make an Ubuntu work as a router using IPTables

(NOTE: all the machines in here are VirtualBox machines. Also, excuse if my english fails sometimes, is not my main language) Hello, I'm in the middle of a project and one of the things I need to do ...
0
votes
2answers
56 views

Hairpin NAT with dynamic WAN IP

I have a dynamic WAN IP so if it changes my iptables will no longer apply. Here is my working hairpin nat, where x.x.x.x is my WAN IP br0 - LAN eth1 - WAN -A PREROUTING -d x.x.x.x -p tcp --dport ...
3
votes
4answers
3k views

IP forwarding from one interface to another on Debian 7

Background The Debian 7 that I run has the following interfaces wlan3 == Internet connection 85.5.48.64/24 wlan2 == act as an AP (hostapd) 192.168.5.1/24 I run the following settings on the ...
0
votes
1answer
61 views

FreeRADIUS 3.0.11 ignoring Access-Request from one NIC interface

I've installed FreeRADIUS 3.0.11 to Ubuntu Server 16.04. The Ubuntu Server runs on a ESXi virtual machine. The virtual machine has two NICs. One is for connecting to an admin network, the other one is ...
0
votes
0answers
19 views

Most efficient way to route all traffic from eth0 to wlan0

I use a Raspberry PI (model B, first generation) as a NAT router. I use a wifi usb adapter to connect to a wifi network, and route all taffic to eth0. I enabled NAT and issued the following iptables ...
1
vote
1answer
4k views

Cannot open port 8080

I'm running a VmWare with an application under JBoss starting up on port 8080. I'm able to access the app from outside the VM if the iptables are off. However, I must turn on iptables due to some ...
1
vote
1answer
20 views

How to apply iptables rules for my OpenVPN?

I'm trying to use iptables rules, but it doesn't work. In my case I want to block specific ip address, so that my client can not visit specific website. I'm using VPS and my ifconfig look like this: ...
2
votes
2answers
3k 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 ...
0
votes
1answer
3k views

Iptables drop forward packets to specific host

I am having trouble isolating a specific host from others on my lan. What I am trying to do is only allow communication between 192.168.0.2. and 192.168.0.8 as well as not allow any other host to ...
0
votes
0answers
48 views

iptables should block ssh, but port is still open

I am trying to get the port knocking service working on my raspberry pi. I have edited my iptables rules to block incoming traffic, but I can still ssh into the pi from my macbook. I should NOT be ...
4
votes
1answer
47 views

Configuration of DMZ on LRT214

I want to learn more about network technology. Therefore I want to run a raspberry pi in the DMZ as a web server. What is working: Appache Server on the pi is working. When I use it in the LAN and ...
0
votes
1answer
35 views

Where is my firewall?

Using Linux Mint 17 and logged in as root... When I enter the command more /etc/sysconfig/iptables I get the error /etc/sysconfig/iptables: no such file or directory When I enter the command ...
1
vote
1answer
13 views

Linux gateway using double data on AT&T, is my iptables wrong?

I have cellular internet connection with AT&T. Everyone connects to the wifi access point that I have my Raspberry Pi connected to as DNS/DCHP/Gateway server. On my Pi I use dnsmasq to give each ...
1
vote
0answers
8 views

What's the difference between iptables “state” and “ctstate”?

I saw this iptables snippet in a different Super User answer: iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT ...
0
votes
1answer
16 views

How might one version control Linux kernel firewall rules?

Our router is CentOS but we just use iptables to modify Linux kernel firewall rules. There is a script that's under version control which resets all the chains/rules, but in doing so drops all ...
3
votes
1answer
3k views

Allow access from outside network with dmz and iptables

I'm having a problem with my home network. So my setup is like this: In my Router (using Ubuntu desktop v11.04), I installed squid proxy as my transparent proxy. So I would like to use dyndns ...
0
votes
1answer
32 views

iptable rule to allow ftp connections between two networks

I have two machines, machine1 is configured with 192.168.1.0/24 network and machine2 with 10.10.0.0/24 network. I have dropped the communication between the two networks with iptables -P FORWARD ...
4
votes
1answer
600 views

Block all outgoing traffic for a User running Wine apps

Good day, I'm using a lot of WINE apps under Linux which work just fine, but one thing I am specifically looking for right now is to block their access to the internet (outgoing), with exception of ...
1
vote
0answers
38 views

rsyslogd: How to prevent logging in the /var/kern.log file and redirecting to another file?

I am trying to redirect iptables log to another file. Based upon my reading on the net, I did the following: In my iptables rule, I have rules like: iptables -A INPUT -s ... -j LOG --log-prefix ...
0
votes
1answer
9 views

Choose gateway regarding incomming node

I have a server behind 2 Internet Access. the ip are these: -Server : 192.168.0.1 -ISP 1 : 192.168.0.253 -ISP 2 : 192.168.0.254 I would like that packets coming from ISP 1 receive response using ...
0
votes
0answers
54 views

Logging LAN traffic with ebtables-iptables-ddwrt

Goal I am trying to log internal(eth0->eth0[via br0]) traffic to syslog on DD-WRT. Problem Bridged traffic is not seen by iptables. The same traffic is also not visible via ebtables. Things I ...
1
vote
1answer
70 views

Openwrt in bridge mode - ebtables kernel error

I have a setup at home as follow: DHCP clients -----> (wifi)(bridge) Openwrt -----> (eth)Main Router The device I'm using is TPlink MR3020 with Barrier Breaker and I tried to set up ...
0
votes
0answers
5 views

iptable flow packets to a VM

I want to create a VM to monitor the packet flow. My server is a Debian-based proxmox. How can I set up iptables so the VM sees all packets, but without changing anything else to the setup? Thanks in ...
1
vote
1answer
243 views

“iptables -P OUTPUT DROP” blocks DDWRT's web interface

When I do iptables -P OUTPUT DROP it blocks DDWRT's web interface. That is I am not able to access http://192.168.1.1 via Firefox. I put this rules before changing the chain policy to drop: ...
0
votes
0answers
13 views

Unable to install iptables [HELP]

Hello so I removed iptables for reasons I don't even know but when reinstalling i get this error Reading package lists... Done Building dependency tree Reading state information... Done Package ...
0
votes
0answers
33 views

Linux ip route / ip rule with fwmark and iptables -j MARK --set-mark

I just need to re-roure all user traffic directly to specified GW (different from the default one) bypass all VPN and other routing rules. Lets start it from scratch (reboot the system), no interface ...
1
vote
0answers
237 views

502 bad gateway after putting up firewall nginx

My server was working, then I added a firewall for a bunch of ports! And now I get the error: 502 Bad Gateway nginx/1.4.6 (Ubuntu) Nginx server { listen 80; server_name 45.79.80.140; ...
0
votes
0answers
5 views

iptables forward combined with bfifo doesnt work

I have 3 interfaces, 2 internal(wlan0,wlan01 )and 1 external (eth1) and i want to configure traffic from eth1 ,so i use iptables to send all outgoing traffic from the internal interfaces to eth1: So I ...
0
votes
0answers
19 views

How to use a local SOCKS server as a gateway?

I'm running a SOCKS proxy server (on an Ubuntu machine) which is used to bypass internet censorship. I'd like the devices in the same network (such as TVs etc), which don't support SOCKS, to use this ...
0
votes
0answers
22 views

write a raw packet to tun/tap

I am a newbie to the tun/tap and iptables. I am confused about some questions about the tun these days. Firstly, I create a tun interface named tun0 and set its ip address to 192.168.128.2/24. If I ...
0
votes
0answers
11 views

set tun interface to visit the internet

I have a tun interface named tun0(10.0.1.1),and a physical interface named eth1(10.110.136.76) on my computer. I want to use the tun0 to visit the internet. Firstly, I create and set the tun like ...
0
votes
1answer
12 views

Allow http request over specific port in iptables

I'm running Kodi with a web service for the remote control. The web server is listening to port 11734, however opening that port (UDP and TCP) doesn't seem to work. Once I accept all incoming traffic ...
1
vote
0answers
20 views

assign IP to tinyproxy on OpenWrt

I have installed tinyproxy on OpenWrt and now I want to make rules for iptables that match traffic from tinyproxy. I want to mark this traffic with set-mark and route it to different routing table. My ...
0
votes
1answer
59 views

Cannot restart apache on Centos 7

I cannot restart HTTPD on Centos 7. When I try to run the command it shows this error below. How can I overcome this? -- -- Unit session-735.scope has begun starting up. Apr 12 15:33:01 ...
0
votes
1answer
36 views

iptables rule doesn't work for port 80

My VM has set some rules for access to a web server and a SSH. The server is running in the internal port 8080 en redirected using iptables to the port 80 with the command: iptables -t nat -A ...
0
votes
0answers
13 views

how many rules iptables or single chain support

I have multiple user (approx 800 users), I am developing IPTABLES firewall for MAC address based filtering. My Question is HOW MANY RULES CAN I ADD IN A SINGLE CHAIN AND HOW MANY RULES CAN HANDLE ...