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
1 view

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 ...
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
18 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 ...
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 ?
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 ...
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
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 ...
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 ...
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
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
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: ...
0
votes
0answers
47 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 ...
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 ...
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 ...
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
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 ...
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 ...
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
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 ...
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
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 ...
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 ...
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 ...
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
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
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 ...
0
votes
0answers
15 views

Automatically apply routes with /etc/network/interfaces

I have a usb-ethernet adapter. When it comes up, I am applying routes and rules to get the network working the way I want. I'm trying to add post-up directives to /etc/network/interfaces to apply the ...
0
votes
1answer
14 views

ipset -j SET --add-set notwroking in cetos

I recently installed ipset rpm and kmod-ipset rpm for my Centos (Linux 2.6.18-194.11.3.el5 i686) and try to hands with help of some examples from internet, but when I try to ban user who tries to ...
1
vote
0answers
28 views

Iptables WiFi , blocking

I would like to block all Wi-Fi devices except one. I have two Wi-Fi routers and I am only allowing one in my IPTABLES rules to connect; but I am able to still connect to both. iptables -P INPUT ...
0
votes
0answers
26 views

fail2ban does not ban IP although there is one failed regex in table

I don't know why fail2ban not adding the bad ip into iptables rules. Here is my setup. /etc/fail2ban/filter.d/http-get-dos.conf [Definition] failregex = ^<HOST> -.*\"(GET|POST).* ignoreregex = ...
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 ...
1
vote
0answers
81 views

Block Windows 10 P2P updates with a corporate firewall

I work for a small IT company that fix mostly Windows computers, and lately we have an huge issue with Windows 10 updates. When a new computer enters our network and starts downloading updates, it ...
0
votes
1answer
31 views

Connected to hostapd hotspot but no Internet

I'm setting up a Gentoo Linux home router with following configuration: eth0: connected to WAN (managed by systemd-networkd) wlan0: access point for LAN (managed by hostapd) I use dnsmasq as DNS ...
1
vote
0answers
22 views

Block all inbound traffic except one IP using windows firewall rules

I have no problem doing this in linux. I just write an iptable to block all traffic and another one after to allow a specific IP. However it doesn't look to be that easy on Windows. I did the exact ...
0
votes
1answer
26 views

block most traffic on an expensive link

I'm running with two wan links. The new one is expensive, and I only want to use it for ssh. The new link is on eth1, 192.168.8.1. I am attempting to use ip tables to block all incoming and out ...
0
votes
1answer
67 views

Redirect secondary network interface traffic along with port forwarding to tun0 (OpenVPN) using iptables

I have a NAS server which I should do port forwarding for it in order to make its services accessible from internet. However my ISP is blocking ports, so I've managed to buy myself a cheap Ubuntu VPS ...
1
vote
1answer
25 views

SSH password login: iptables Log/Drops listsDST=18.9.2.13/18.7.33.13

Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User. ...
1
vote
1answer
109 views

Configuring CentOS 6.7 as a Squid proxy server: How may I solve this issue?

I'm using a PC running on CentOS 6.7 with 2 NIC's (eth0 & eth1) as a Squid Proxy server. eth0 (Red interface/ 192.168.0.2/24) is connected physically with the router (192.168.0.1/24) while the ...
1
vote
1answer
69 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
32 views

Linux routing traffic from wlan0 to localhost:port

I'm behind TGM proxy , connected via LAN on eth0 which goes to my laptop. Creating socks proxy tunneled with ssh via cntlm can bypass the proxy which is fine for my laptop. But I struggle to create a ...