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
8 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 ...
-1
votes
0answers
7 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 ...
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
2answers
2k views

Fedora's firewalld vs iptables

I am on Fedora 19. Is my understanding correct that as long as firewalld is up and running (and properly configured using firewall-config) the contents of the /etc/sysconfig/iptables has no meaning? ...
2
votes
1answer
60 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 ...
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 80....
1
vote
2answers
30 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 ...
3
votes
1answer
34 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 ...
1
vote
1answer
2k views

linux drops packet when trying to route it - why?

I track packets using LOG targets for all chains of all tables and the last chain I see my packet in is the POSTROUTING chain of the mangle table: mangle_PREROUTING: IN=eth0 OUT= MAC=00:16:3e:0f:01:...
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
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 ...
2
votes
2answers
290 views

Logging communication between two VMs

I'm trying to set up "malware lab" described in this paper. So far, I've set up Windows guest system, adding one Host-only Network adapter, and setting this (sorry if the names aren't exactely correct,...
0
votes
1answer
39 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 ...
1
vote
0answers
22 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
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 ...
8
votes
1answer
274 views

SSH to Vmware virtual machine with NAT network [duplicate]

right now I am able to ssh to host over internet and ssh from host to the virtual machine. What I want to do is ssh directly to the Guest machine from outside. I tried to do this using iptables: ...
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
2answers
282 views

Iptables rules to only whitelist SIP providers

I have an Asterisk box sitting behind an ADSL router/modem. There are no other services on the Asterisk box, just telephony. I am getting a lot of traffic which I think are SIP probes. I've ...
0
votes
0answers
29 views

Configuring Android IPtables to ACCEPT connections on PORT X [closed]

Android version : Lollipop. Rooted: Yes. I'm trying to configure correctly my android firewall, but I see there are many iptables chain and I'm not sure how android is using it. I have a PC ...
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
27 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
27 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 ...
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
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
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 ...
15
votes
1answer
12k views

pfctl port forwarding in Mac osx?

-A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 -A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8080 -A POSTROUTING -s 10.0.10.0/24 -o ...
0
votes
0answers
35 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 ...
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
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 ...
1
vote
0answers
429 views

Configuring iptables for guest WLAN in DD-WRT

I'm constantly failing to get a guest WLAN in DD-WRT working. I can connect to the second SSID and get an IP address of the second DHCP server range. But I cannot connect to the internet. I followed ...
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 ...
3
votes
1answer
109 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 ...
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 ...
3
votes
2answers
464 views

How to set up a hotspot with socks5 proxy

I have a laptop with linux installed on it. The laptop has two network interfaces: eth0 and wlan0. Normally I surf the Internet through eth0, and I've successfully set up a hotspot in linux for my ...
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 ...
4
votes
1answer
7k views

How do I forward traffic between Tun device and eth0?

In summary, I would like to have Tun device traffic forwarded back and forth through another network interface that has internet connection. While I can see the traffic going out to internet and ...
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
1answer
42 views

How to white list some ip and all the rest block while having already a DMZ?

I have a Linux machine running which has local ip: 192.168.1.2 connected to a router with public IP 8.8.8.8, now the router 8.8.8.8 has DMZ to 192.168.1.2 As a result spammers, hackers, crackers ...
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
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
3answers
55 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
12 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 ...