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
3answers
56 views

Port forward from LAN to an OpenVPN client (iptables?)

I have a OpenVPN server running in a LAN (locally addressable at 192.168.1.12) and I'd like to forward requests to it from other devices on the LAN, over just port 3000, to one of the VPN clients. (10....
1
vote
1answer
13 views

Blocking FORWARD on iptables except port 80

I got a subnet that is protected by a computer that acts as a firewall. The rules I want this firewall to have are: Deny all INPUT iptables -A INPUT -j DROP Allow all OUTPUT iptables -A OUTPUT -j ...
0
votes
0answers
19 views

Receive incoming public IP addresses through VPN?

For a short spell, I ran a VPN server with OpenVPN + iptables on a VPS I purchased, and would tunnel my home server through it, in order to mask my home server's IP address from visitors. This worked ...
0
votes
1answer
37 views

DD-WRT - Redirecting internet traffic based on source Subnet

Following question has a long description. I hope some one in similar position finds it helpful. Please be patient. My problem is at the end. First of all, I have the following setup in home: --...
0
votes
0answers
56 views

UDP Short packet

My mychine is probably under some kind of DoS attack, my syslog is full of: kernel: [5618300.661196] UDP: short packet: From 119.37.12.102:53 4103/1480 to x.9.158.119:3604 kernel: [5618300.663014] ...
3
votes
2answers
6k views

Apache runs locally but can't be accessed from other machine

I'm running Apache 2.2.3 in a VM for a test environment on CentOS 5. Apache is running and responding to requests on the VM itself. If I run "lynx localhost" on the VM I do get my test page. When I ...
2
votes
0answers
74 views

How do I kill existing network connections on Linux?

I've been working on a project that is nearly complete: to be able to kill my children's internet connections at the touch of a button. I've implemented part of the solution by basically calling: ...
4
votes
1answer
261 views

Windows 10 - NAT - Port forwarding & IP masquerade

I'm looking for a way to get iptables functionality in windows 10. I enabled IP routing and I need to forward tcp data to another host (port 8080) and then forward his response while masquerading IP. ...
0
votes
1answer
23 views

Block common dos attacks

I have been searching for some basic IPTABLES protection agains Syn attacks and floods I have found thise commands: iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP //syn protect ...
0
votes
0answers
48 views

Opening a port with firewalld doesn't seem to work

I have configured sshd to live on a different port. I have opened that port using firewalld: $ sudo firewall-cmd --zone=public --add-port=22000/tcp --permanent Listing rules shows port 22000 is ...
0
votes
1answer
22 views

IPTables — Forwarding to Attached Client but keep source IP

Here's my scenario: I have a VPS that has two IP addresses and is running OpenVPN (IP Address of OpenVPN server: 10.1.2.1). I want to forward all received traffic on ONE address to VPN-client (10.1....
0
votes
1answer
34 views

IP forwarding from one server through default route

I have a device (IP 10.110.1.3) with the following rule set up: $ ip route default via 10.110.1.4 dev wlan0 onlink I have ipv4 forwarding enabled on both machines. Both machines can talk to each ...
1
vote
2answers
1k views

iptables and NetworkManager on Ubuntu

I want to use iptables configuration on my Ubuntu 10.0.4 desktop, however I read that Network Manager and iptables have some conflicts. Should I uninstall NetworkManager? If yes, how? https://help....
3
votes
4answers
3k views

iptables - add rules not as root

One of our servers is being hit daily by a large number of spam bots. They're not able to post any spam, but they still try and end up slowing down the server for real users. To counter this, I have ...
0
votes
0answers
28 views

OpenVPN Bridge not working

i'm trying to start an openvpn server on a vps and it is not working. Traffic comes to the server from the client, but the server does not redirect it to the host. This are my configuration files: ...
1
vote
0answers
26 views

How to make proxy server for firefox with linux iptables

I want to use the proxy options in firefox to forward all my connections and network packets to a proxy server (Linux-VM) that will then forward the packets to the real router. The VM is connected to ...
0
votes
0answers
36 views

How to persistently apply iptables rule?

After much trials and tribulations I have set up a raspberry pi VPN using this (https://sys.jonaharagon.com/2016/05/12/setting-up-an-openvpn-server-on-a-raspberry-pi-2-part-12/) guide. However at the ...
1
vote
1answer
476 views

Is it possible to setup a NAT loopback on a router with a dynamic IP using iptables?

I've set-up a Raspberry Pi home server attached to my router. I have a dynamic IP. I can access the server within my network using the internal IP (192.168.0.8). I can also access the server outside ...
1
vote
1answer
574 views

Block port 111 on centos 7

I am using a server with centos 7 running kvm/virtualization, I access using VNC server. Today I received an warning about my server being used to attack other server using port 111, I am completely ...
0
votes
0answers
19 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
18 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
52 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]# iptables-...
1
vote
0answers
21 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
2k 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: http://joelslowik.blogspot.co.uk/2013/05/setup-...
3
votes
2answers
62 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
52 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
38 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
37 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
31 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
1answer
26 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
52 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
15 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 ...
1
vote
2answers
76 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
102 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
39 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
34 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
60 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
71 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
46 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
19 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
23 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
21 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
48 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 DROP....
4
votes
1answer
633 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
75 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 ...
1
vote
0answers
76 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
121 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 ...