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

SSH port block: port forwarding

I need to access SSH on machine A within another port than 22, because there are only the standard ports allowed to access from the network I use. Therefore, I want to route port 443 of machine B to ...
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
3k 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 ...
0
votes
1answer
31 views

What is the best way to limit the IP addresses which can be access from within a docker container?

I have an answer which will limit docker containers to only be able to access a single IP address outside the host. Using this iptables rule on the host: iptables -I FORWARD -i docker0 ! -d 8.8.8.8 ...
0
votes
0answers
9 views

Forward VOIP phone on eth1 over OpenVPN (tun0)

I have a remote computer connecting to my network via OpenVPN. This computer is running Linux Mint, and has two network cards: eth0: used for Internet connection eth1: has a VOIP deskphone plugged ...
0
votes
1answer
24 views

IP masquerading, rule to forward packets between the Interfaces (on a multihomed network device)

Preamble This question can be considered as a followup to link Setup System: Embedded linux system running netfilter and iptables enabled kernel. Number of interfaces: 2 eth0: Connected to a NAT ...
0
votes
0answers
16 views

OpenVPN iptables and security

I want to run OpenVPN at home. I have a virtual instance of Debian 8 on my ESXi 6.0 host with its primary IP as 10.0.0.99. I assigned multiple virtual NICs (server, vpn, management, backup) with the ...
0
votes
1answer
42 views

iptables - allow access to a web server from the outside

I am trying to allow access to a web server from the outside and I am getting nowhere. Granted I do not have any experience in iptables, but I have dabbled in Cisco ACL and NAT. I am not sure what I ...
1
vote
1answer
2k views

iptables: How to redirect port in Red Hat Linux (RHEL)?

I'd like to forward port 80 to 8080. So I tried to edit /etc/syscongfig/iptables: -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 But got: # service iptables restart ...
1
vote
0answers
28 views

How to route traffic from one interface to another regardless of source ip?

I asked this question on network engineering, but they told me it was off-topic there and I should therefore try on superuser. So, I'm deploying some raspberry pis for a specific network task. I'm ...
1
vote
1answer
21 views

ssh into local machine from remote maching

I would like to ssh into my local machine, from a remote ssh shell. by looking at ifconfig $ ifconfig wlan0 Link encap:Ethernet HWaddr 60:d8:19:24:bd:8b inet addr:137.44.181.163 ...
0
votes
1answer
39 views

Allow access across subnets not working

I have two routers. One is running DD-WRT and the other is running Tomato. The DD-WRT router is the main router the WAN connection goes through. The Tomato router is for my PIA VPN. DD-WRT is a ...
0
votes
0answers
18 views

Why does iptables not doing DNAT for the same subnet?

I have the following NAT setup: Whereas Host 1 has a VM with IP 10.0.0.3 and HOST 2 has a VM 10.0.0.4. The NAT box will have a NAT rule such that it changes the dest IP 172.24.4.2 to 10.0.0.4: -A ...
1
vote
2answers
94 views

How to passthrough Wifi DNS and internet access to DHCP client

I have a laptop that connects to wifi for internet access. This computer is running Linux (Fedora), and it is acting as a DHCP server for another (ubuntu linaro) computer that does not have a wifi ...
-2
votes
1answer
31 views

Redirect Https requests?

Being a noob for such considerations, please dont hit me... I have redirection from many domains --to--> a unique landing page of my server. This works painlessly for http Here is my question : ...
0
votes
1answer
19 views

Allowing emails on iptables

I am trying to configure my iptables firewall (currently rejecting all traffic) to allow emails traffic. For SMTP port 465 is used (SMTPS port), and for IMAP it uses port 143. But whatever I try, I ...
0
votes
1answer
24 views

iptables redirect blocked IPs from one chain to a honeypot

I am currently using psad to automatically block potentially harmful IPs. When it detects an attack it adds the ip to PSAD_BLOCKED_INPUT or PSAD_BLOCK_OUTPUT and then drops all further traffic from ...
0
votes
1answer
11 views

Making a two-way bridge between two interfaces

so i wish to bridge a connection, I made a quick drawing of my setup: (eth0 isn't connected to anything) All of the computers are running centOS 7. Network Diagram I wish to allow PC A to ping and ...
0
votes
1answer
754 views

show interfaces in iptables -L

Is there a way to show the network interfaces via iptables -L in Ubuntu 12.04? When I execute an iptables -L I get an output like this : Chain INPUT (policy DROP) target prot opt source ...
0
votes
2answers
59 views

How to set up iptables to open ports 80 and 443

I try to understand how iptables works but after a lot of hours and readinga lot of articles I have stuck. What I want to do is DROP INPUT & FORWARD policy and open some ports. More specifically, ...
2
votes
1answer
147 views

IPSet with IP6Tables ERROR

Can someone please solve my headache and tell me how to fix this? [root@www ~]# ip6tables -I INPUT -m set --match-set blacklist6 src -J DROP ip6tables v1.4.7: Couldn't load match ...
0
votes
2answers
28 views

How forward packets from network interface to another

My problem is forward packets from eth2 that is my LAN to eth1 that has access to internet, to allow eth2 to access to internet, here my configuration: auto eth1 iface eth1 inet static address ...
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
42 views

Why put ACCEPT target after DROP in iptables?

My iptables -nvL looks like this: bash# iptables -nvL Chain INPUT (policy ACCEPT 1031 packets, 81085 bytes) pkts bytes target prot opt in out source destination ...
0
votes
1answer
28 views

bridge WAN interface with TUN interface except openvpn port

I want to make a bridge between eth0 (static WAN) and tap0 (TUN), but leave 1194 port for openvpn on eth0. Is it possible? How to achieve it using iptables?
0
votes
0answers
22 views

iptables does not redirect my HTTPS request

I configured my tables to redirect all traffic to a static IP. for ports 80, 443 + any port (NAT-DNAT redirect withour having specified ports). If I enter an IP:anyport or an url.ext, it does ...
0
votes
0answers
14 views

How to ensure iptables DNAT redirect all, to work with domains?

When redirecting all sources (any port) to my router IP, it works with IP. I do this with iptables, Nat/DNAT PREROUTING. $ iptables -t nat -A PREROUTING -i wlan0 -p tcp -j DNAT ...
0
votes
2answers
23 views

NAT iptables : why wrong/empty destination in saved config?

Here is rules I put in iptables : $ iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j DNAT --to-destination 19.11.11.1:80 $ iptables -t nat -A POSTROUTING -j MASQUERADE ...
2
votes
3answers
3k 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 ...
1
vote
1answer
28 views

openwrt using iptables with tee seems broken

I've been trying to set up port mirroring on openwrt version 14.07 following this guide: however the command: $iptables -t mangle -A POSTROUTING -o br-lan ! -s 192.168.0.0/16 -j TEE --gateway ...
0
votes
2answers
59 views

ipTables, how to block all services requests on port 80 for an IP?

On a linux server/router, I want to block port 80 only for one IP (example : 1.2.3.4 ) I have been given this example : ### Block Incoming Port Requests (BLOCK PORT) # To block port 80 only for an ip ...
0
votes
1answer
26 views

What is MASQUERADE made for?

A simple redirection is used on my server, with iptables rules : $ iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 13.37.42.1:80 $ iptables -t nat -A POSTROUTING -j ...
0
votes
0answers
15 views

Unhappy mixture: linux, tuntap, namespace,pppoe

I have created three namespace(ip netns), x, y z and a ip bridge called brig0. I am trying to route packets to the pppoe connection in namespace y. I want to know why tun0 says "no-carrier"? How can ...
0
votes
2answers
30 views

Use iptables to block local connection

I wish to block all connections (local and remote) to a service running on a particular port, say port 1000. I have tried the following command: iptables -I INPUT 1 -p tcp --dport 9999 -j DROP ...
0
votes
0answers
32 views

Connection interruptions on Debian router, possibly due to excessive duplicate ACKs?

I have a Debian server as a house router, which for a year has been working flawlessly. However, I recently moved and switched service providers from FiOS to Comcast, and possibly as a result am ...
0
votes
0answers
18 views

OS X iptables owner equivalent OR use only vpn for specific user

I am trying to make sure all network traffic initiated by a specific user on OS X Yosemite will go through a specific vpn or otherwise be blocked. I imagine I could do that easily on linux using ...
1
vote
0answers
117 views

how to port forward to server + tunnel specific hosts route though openvpn client on tomato

Running Shibby Tomato v130 on an Asus RT-N66U. My goals are the following With Transmission running on the router have all torrent traffic route through an OpenVPN client also running on the ...
2
votes
1answer
55 views

Connecting router traffic to sshuttle tunnel

I am using sshuttle to get cleanly out of a questionable hotel wifi connection. I have a little travel router and would like to use it as well, briding my laptop's sshuttle connection so I can connect ...
3
votes
1answer
45 views

Program to block an IP temporarily with iptables

Is there a program on Debian to block an IP address temporarily just by launching a command (specifying the IP and the duration)? With iptables/ip6tables alone I can create a rule, but I would then ...
1
vote
0answers
40 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
25 views

iptables block access to all ports except 53 (tcp,udp) from one IP address

how can i block all ports from one IP address except the port 53 TCP,UDP? example: ip 192.168.0.15 access only port 53 (udp,tcp). thank you.
7
votes
1answer
104 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
0answers
22 views

Automated Wifi on Raspberry Pi

I have a NAT set up, that allows my devices to bypass the MAC filter in the local dormitory router. The setup works, but since my original "nat server" has died (the HDD got fried), I had to put my ...
0
votes
0answers
28 views

How To Configure Portforwarding with iptables

I have got a "Hypervisor" witch has two interfaces: eth0 Link encap:Ethernet Hardware Adresse d4:3d:7e:fc:b2:db inet Adresse:87.25.34.251 Bcast:87.25.34.255 Maske:255.255.255.192 ...
0
votes
0answers
36 views

DSCP to p bit mapping in Linux

Re posting from Networking forum as per suggestion Linux1--------------------------------------------Linux2 eth0 10.10.10.30 eth0 10.10.10.10 eth0.50 20.20.20.30 ...
0
votes
0answers
16 views

Bypassing VPN routes based on the destination port

I have a Raspbian machine connected to a VPN using OpenVPN. Without any configuration, all traffic goes through that VPN and I have no control over the VPN server. What I'm trying to achieve is ...
0
votes
2answers
3k views

iptables not starting on CentOS 6

I am running CentOS release 6.5 (Final) and cannot figure out why my iptables is not starting. I may have executed some other command to permanently prevent the start up of iptables; I do not ...
0
votes
1answer
53 views

Iptables SNAT routing to openVZ containers

For this to make sense I need to set the scene a bit. I have a dedicated server with 5 public Ips : A.B.C.1 to A.B.C.5 A.B.C.1 manages the dedicated server itself, and A.B.C.2 - 5 are used for ...
3
votes
1answer
42 views

iptables on openwrt router: logging connections to a host from clients on the same subnet

I am trying to setup an auto wake-on-lan setup using my router that is running OpenWRT 14.07, Barrier Breaker. My idea is that the router monitors any connection attempts to the host I want to wake up ...
1
vote
1answer
116 views

Docker tunnel traffic on specific port via VPN

Not sure if this is docker specific or a general networking question. I'm running a Debian Jessie server with serveral docker containers. My understanding is that docker creates a virtual interface ...