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

2
votes
1answer
19 views

Configuring iptables to block all ports with three exceptions

I have been struggling with iptables in Linux to get the right configuration. Basically, I am trying to set rules that accomplish the following goals: Incoming traffic that is part of an established ...
0
votes
0answers
8 views

iptables captive portal bypass rule

I have created a captive portal using IPtables which works fine for android and PC users but I believe the problem is with Apple iOS7+ captive portal detection is causing the problem. I need Apple ...
2
votes
1answer
64 views

How to redirect all traffic except SSH to one local port with iptables

Host OS: Ubuntu 16.06 LTS I have my server listening on port 1233. I have to redirect my all TCP and UDP traffic to port 1233 except the SSH port. I successfully redirected my all ports to 1233 with ...
1
vote
2answers
31 views

How to get iptables rules to load at startup?

Just installed Arch Linux and saved some iptables rules using iptables-save but they won't load at startup. What does this mean? The systemd unit file point to the location where the rule ...
0
votes
3answers
29 views

How to configure Linux iptables to block a specific port of server?

I am trying to implement port restricted cone NAT. I want to block a specific port 3479 of server 192.168.10.102. iptables -A INPUT -i $WAN -p udp -s 192.168.10.102 --sport 3479 -j DROP iptables -A ...
0
votes
1answer
8 views

Use DDNS domain for multiple machines and ports

I have the following setup: 1st) a Raspberry Pi with ssh and ftp in my home lan, which I access from outside via a dynamic DNS domain. 2nd) a website on a webspace with a free hoster which is ...
0
votes
1answer
40 views

How can I do DNAT and SNAT on Windows 7?

I have a very old program which uses a fixed IP address as destination. I'm trying to revamp my network into something more modern but this legacy system is holding me back. As a simple solution, I ...
0
votes
0answers
9 views

Why loading a webpage with iptable allowing only HTTP is so slow?

I'm using iptables to forbid every OUTPUT connection except the one using HTTP, so here is my iptable: Chain INPUT (policy ACCEPT) target prot opt source destination Chain ...
0
votes
2answers
22 views

Flushed my routing table and internet no longer works, how to repair

I was trying things with the routing table, wanted to delete a rule I just added and thought it was easy like with iptables and flushed the table. Now I no longer have a connection. When I ping ...
0
votes
0answers
15 views

rlogin: ipaddress : connection refused

I have host only network setup with two linux distributions virtual machines (kali and security-onion). Connection bw both vm is fine as both able to ping each other successfully. I tried rlogin ...
0
votes
0answers
70 views

Selective VPN configuration

I'm using Fedora 23 64-bits. I quite often have to connect my computer to my work PPTP VPN to commit code changes, browse the intranet for information, connect to remote desktops, and etc. The VPN is ...
1
vote
0answers
24 views

Using bash script to merge 2 ipset rules

I have 2 ipset rules in 2 files, they are: file 1: /etc/ipset.up.rules add mynetrulesssh 103.207.38.64/26 add mynetrulesssh 103.207.38.96 add mynetrulesssh 222.186.34.122 file 2: /etc/ipset.up....
0
votes
1answer
11 views

et0 vs tun0 with OpenVPN

Hello I'm trying to understand how OpenVPN works and I'm wondering the following thing : Since all the traffic should pass through tun0 once the computer is connected to the VPN you should be able to ...
-2
votes
0answers
28 views

Creating localhost “domains”

I have a virtual machine with a server accessible via localhost:<some port>. I would like to be able to access that server via someapp.local. Can this be done using something like iptables? The ...
0
votes
0answers
7 views

Rinetd configuration does not want to change?

I made a successfull port forwarding with the following: Machine A: iptables -P OUTPUT DROP iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT In /etc/rinetd.conf I changed for: ...
0
votes
0answers
28 views

Port forwarding with rinetd: still the same configuration after rinetd.conf modif

I'm using "iptables" and "rinetd" between two linux virtual machines in order to test the port forwarding technic. Here is how I proceed: I allow Machine A to connect only on port 53 for outgoing ...
0
votes
0answers
10 views

How to accept/check outbound traffic only on a specific port ? (iptables)

Here is what I did to allow outbound connection only with port 53: iptables -P OUTPUT DROP iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT Then I try: telnet google.fr 53 And I get a "...
0
votes
1answer
19 views

How to check if a specific port is open for OUTPUT mode?

I'm playing with iptables on Linux, and I created some rules to allow only port 53 to send packets: iptables -P INPUT DROP iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT Now I would like to ...
0
votes
1answer
14 views

iptables for routing 8080 and 8443 to 80 and 443 respectively

I have the below script that creates my iptables. How can I make it so if I access IP_ADDR:8080 or :8443 it routes to 80 or 443 respectively? #!/bin/bash # Delete all existing rules iptables -F # ...
0
votes
0answers
37 views

How to access the port of a reverse SSH tunnel on the hosts loopback device from within a Docker container?

I have the Xdebug PHP extension installed in a Docker container that runs the PHP-FPM of my development and testing environment. A debugging client (the one build-in PhpStorm) listens on port 9000 on ...
0
votes
1answer
32 views

Do you have to care about ipv6 for security?

I currently have 2 IP : one ipv4 and one ipv6 meaning that both protocols can be used. I'm wondering whether it is dangerous from a security standpoint : If I make a set of rules for iptables (v4) ...
0
votes
0answers
18 views

Linux VM as gateway for tablet in same network

I want to sniff some traffic from my tablet. I thought that I can do that by creating proxy server and route all traffic via it (using mitmproxy). Sounds easy but I struggled a lot. My current config ...
0
votes
0answers
17 views

Can't connect web server from a port-forward.

I have a web-server that is running fine and anyone on My LAN can connect with it's local I.P. We recently switch to this server from a previous server running Rhel5 our current server is running ...
0
votes
0answers
16 views

VPS services (SSH, HTTP) doesn't work after reboot

I rebooted my VPS (sudo reboot) and since that I can't access SSH. Web server is also down. Immediately before reboot I installed python-mysqldb package. I don't modify any system file. 64 bit Debian ...
0
votes
1answer
28 views

Is it worth to block inbound packets from a security standpoint?

If I block all the outgoing packets with iptables then in theory my system is safe since incoming packets won't be able to trigger data stealing. However those incoming packets can still exploit some ...
1
vote
1answer
9 views

Does FORWARD traffic that gets redirected(PREROUTING) pass through the FORWARD(filter) chain?

Good day, Does traffic that gets redirected by the nat PREROUTING chain to the localhost then still pass the FORWARD filter chain? Example: iptables -t nat -A PREROUTING -p tcp --dport 22 -j ...
0
votes
0answers
8 views

iptables rules for bridge networking cent OS 7

I currently trying to secure my server with iptables. But i am struggling to get te correct firewall rules for allowing traffic to the vm's and host it self. i want to block traffic that is incoming ...
3
votes
1answer
112 views

iptables reject tcp-reset on loopback

I am trying to check how a software would behave if there is a network failure. That software is using tcp send() and recv() to communicate. Previously I was making the software communicate by ...
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
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: --...
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....
0
votes
2answers
59 views

Iptables - Remove filtered ports and close them

Here's the result of nmap command on my dedicated server from my home linux pc : Not shown: 980 closed ports PORT STATE SERVICE 20/tcp filtered ftp-data 21/tcp filtered ftp 22/tcp ...
1
vote
2answers
60 views

iptables prevent lan access from another router

I have two Tomato firmware routers setup. Router X is connected to the internet via it's WAN port. The router Y's WAN is connected to router X's LAN1 port. I'd like to restrict router Y so that it ...
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
1answer
35 views

VPN connection problems regarding plex media server and voice over IP

I have a home server - running Debian Jessie and plex media server. My router (fritzbox) allows all smartphones in my LAN to receive incoming landline calls (due to a certain app). This part works ...
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 ...
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: ...
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
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....
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
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 ...
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
25 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
573 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 ...