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
1answer
89 views

Most secure way to have IPtables auto-loaded using Debian / Linux

I'd like to know the safest way to load iptables using Debian. Of course, I can use a script that uses iptables-restore : #!/bin/sh iptables-restore < /etc/firewall.conf but : 1) where is the ...
1
vote
1answer
147 views

OpenWRT Firewarll INPUT Chain allowing everything?

I haven't done anything to my the default firewall rules except open a port for ssh from the wan and add the rules for OpenVPN as defined in this tutorial: ...
1
vote
3answers
47 views

Firewall init script

On Debian, what is the best way to start an iptables firewall script : /etc/init.d/firewall_script.sh in /etc/network/interfaces, add post-up /etc/network/if-up.d/firewall_script.sh Do you check ...
1
vote
1answer
313 views

Combination of NAT, DHCP, and OpenVPN on lubuntu 14.04

Okay, so I've got a set up, where eth0 my internal IP address (192.168.1.3) it has been configured as my default gateway using the iptables this sudo sysctl -w net.ipv4.ip_forward=1 sudo ...
1
vote
1answer
190 views

Iptables deny access to a specific IP address not working

I'm not able to deny access to a specific IP address or deny access to a specific IP address range as well. My network environment is, I have one router which IP is (30.30.10.1) and second my hotspot ...
1
vote
2answers
739 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 ...
1
vote
1answer
368 views

How to block incoming traffic on a virtual interface?

How do I block all incoming traffic on eth0:0 but keep eth0 open? What I've tried is this: iptables -P INPUT DROP iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -i eth0 -j ACCEPT But this ...
1
vote
1answer
237 views

Iptables limit user access time and mac

I am trying to create an iptable chain to kick my daughter off her ipad during the night. With the mac only filter I can block access but when I add time it no longer works. Does anyone see an issue ...
1
vote
1answer
202 views

With iptables only allow certain outbound ports

Okay, I'm running a router with shibby tomato (linux based) v1.28-115 and have a bridge network setup (br1) that consists of a guest wifi. I want to only allow access to specific outbound ports... ...
1
vote
1answer
431 views

Chromecast, Unblock-Us and Edimax BR-6478AC router

It seems that Google has hard coded the Google DNS into the Chromecast, thus making it pretty much useless for anyone outside the U.S. who wants to use it for Netflix and Hulu. I have the above ...
1
vote
1answer
94 views

Drop IP fragments of a certain protocol

When conntrack is active, the iptables stack never sees a fragmented IP packet, only the reassembled one (source), so the -f test never matches. If I want to block any fragment I could set ...
1
vote
1answer
192 views

Disable SSH remote tunneling

I need to restrict SSH tunnel functions. Users should not be allowed to create remote tunnels but only tunnels to localhost. I tried to setup the whole thing in the SSH configuration but I can only ...
1
vote
2answers
1k views

CentOS 6.4 and alternate SSH port not working

I've got a CentOS 6.4 machine and would like to change the default SSH port, and followed these instructions: CentOS Wiki After making those changes (including the "semanage port -a -t ssh_port_t -p ...
1
vote
1answer
465 views

Internet access to host behind firewall using ssh tunnel

My goal is to give host behind firewall access to the internet. Below you can find brief description of network [internet] <-> [proxy] <-> [A] <-> (firewall) <-> [B] [A] - ...
1
vote
3answers
5k views

Source Based Policy Routing & NAT (DNAT/SNAT) aka Multi WANs on CentOS 5

Originally posted at Unix and Linux but nobody was able to answer it, so m migrating the question here: My question is regarding Source Based Policy Routing on CentOS 5 with 2 WANs plus a LAN (NAT) ...
1
vote
1answer
1k views

Forward connections on 0.0.0.0:80 to 127.0.0.1:9091

I'm trying to set up a tor-relay. In order to allow tor to present a static web page explaining what it is I want the server to listen on port 80 and 443. In order to allow tor to use ...
1
vote
1answer
499 views

OpenVPN + Squid or another way of blocking advertisements/websites?

I have a personal VPN that I use on my tablet for public wifi protection. Adblock+ is limited on android in that you need to set up a proxy for it to work, and this isn't ideal. Before I started ...
1
vote
1answer
241 views

ICMP firewall policy for standard ubuntu desktop

For a standard desktop computer running Ubuntu 12.04 behind a NAT router, what ICMP packets should one accept in the firewall, say iptables? It seems there is often conflicting advice; some say block ...
1
vote
2answers
667 views

How do I route a port range in a linux host to a guest VM?

I am trying to redirect a certain port range in a linux host to one of its guest VMs. I would like for this redirection to apply to all the host's interfaces, including localhost. I was able to do: ...
1
vote
1answer
2k views

iptables rule for loopback interface lo

I want to test some network performance, where I need to use a tcp client to connect to a tcp server program on the same host, so I used localhost(127.0.0.1) however, when the TCP SYN is sent, it get ...
1
vote
1answer
1k views

Can't connect to SSH over VPN when using 3G only

I'm having a bit of a strange problem that I'm not sure how to debug/fix. I have a Raspberry Pi connected to a Windows VPN via either a wired interface or 3G dongle. With the wired interface I can ...
1
vote
2answers
1k views

IPtables Rules to Block IP Range

I've applied the following rules from a text file called "iptables.save" to iptables. But to my dismay, I found that the ip address 107.22.26.176 is still able to access my server via TCP. What did ...
1
vote
2answers
804 views

How to test IP Tables Rule (Linux Ubuntu12.04)

I wanted to ask how to test IP Table Rules. For example, I have a port number and I want to be sure that it accepts all packets. How can I do it? After I type iptables -L I see that the rule has been ...
1
vote
1answer
648 views

What is command to look list of redirect rules, iptables

im using command like this : iptables -t nat -A PREROUTING -p tcp -d 192.168.1.118 --dport 4080 -j DNAT --to-destination 192.168.1.118:4088 My question what is command to look all rules in the ...
1
vote
2answers
2k views

iptables port based routing

I've been Googling this for days with no success. I connect to a VPN from my server from time to time and I'm trying to configure my Debian server to only use port 80 and 443 through the VPN and all ...
1
vote
2answers
734 views

iptables block everything except http

I'm trying to configure my iptables to block any network traffic except HTTP: iptables -P INPUT DROP #set policy of INPUT to DROP iptables -P OUTPUT DROP #set policy of OUTPUT to DROP iptables -A ...
1
vote
2answers
555 views

Packets marked by iptables only sent to the correct routing table sometimes

I am trying to route packets generated by a specific user out over a VPN. I have this configuration: $ sudo iptables -S -t nat -P PREROUTING ACCEPT -P OUTPUT ACCEPT -P POSTROUTING ACCEPT -A ...
1
vote
1answer
336 views

Rate limiting traffic between specific hosts (based on their MAC) using iptables

I have setup a simple isolated network consist of following Linux based machines (simplified example): Node1<---->Router<---->Node2 Router's eth0 is connected with Node1's eth0. Router's eth1 is ...
1
vote
1answer
460 views

Reasons why ports below 1024 cannot be opened

I'm root on a machine I don't know how it was configured. I try to open SSHD on another port than 22 but it does not work. I changed the /etc/ssh/sshd_config file and added a new Port line extra to ...
1
vote
1answer
717 views

Difference default setting on iptables between CentOS 6.3 and Ubuntu 12.04

I would like to ask in ubuntu 12.04, there is no firewall settings by default? iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD ...
1
vote
1answer
343 views

internet connection gone after $ iptables -F INPUT

I have a PC with two Ethernet cards, and I was trying to configure my eth1, but when I typed $ iptables -F INPUT, the internet was gone on eth0. Does anyone has any idea how to get my internet ...
1
vote
1answer
117 views

Separating two networks

I have two routers, R1 and R2. R1 (a stock linksys router running dd-wrt) is connected to internet and is serving internet to a network of 5 devices/PCs running a DHCP server, with a network of ...
1
vote
1answer
682 views

Linux Iptables Routing

I need help with a problem. My setup is: CentOS (Router) eth1 18.0.168.1 255.255.248.0 eth2 145.165.34.1 255.255.254.0 Windows Server 2008 18.0.168.2 My problem is from the Windows machine, I ...
1
vote
2answers
785 views

Firestarter device not ready when booting Ubuntu

I am trying to get firestarter running on Ubuntu 11.10 and I am getting an error: Failed to start Firewall The device eth1 is not ready. Please check your network device settings and make sure ...
1
vote
1answer
3k views

Ubuntu 11.10 firewall/gateway - no client internet access

I have read many other posts but cannot figure this out. eth0 is my external connected to a Comcast modem. The server has internet access with no issues. eth1 is internal and running DHCP for the ...
1
vote
1answer
324 views

iptables Settings as WAN Input for Router

I have an eee running ArchLinux with wireless access to the Internet. I want to use it as the WAN input for an Asus RT-G32 router into which it is hardwired. The router in turn is hooked up to a ...
1
vote
2answers
375 views

iptables rules revert on Ubuntu

I'm using iptables on Ubuntu 10.04 and whenever I set iptables rules they will revert after a while. I set them with iptables -I INPUT or iptables -D INPUT and they work immediately and I see them in ...
1
vote
1answer
309 views

Is this firewall completely secure?

I'd like to know if there's any holes/flaws in this firewall setup. I want to lock down the server as much as possible so it is impossible to hack in to. The only services running are openvpn and ssh. ...
1
vote
1answer
963 views

loopback error, home network

I've setup my router to forward port 80 through to my computer, so I can access it from a dyndns.org domain. The domain and the ip both seem to be totally working, externally (can access it from ...
1
vote
1answer
2k views

DD-WRT OpenVPN client - cannot get “lan” connected device to route traffic

I have OpenVPN client setup on DD-WRT openvpn small. client connects and can use traceroute to verify everything is tunneling out the openvpn connection. ip_forward is 1. iptables -t nat -A ...
1
vote
1answer
155 views

How to setting up iptables for traffic fowarding on port 80 from specific sources

Im running a web server on port80, but i want traffic coming from ip 212.333.111.222 on port 80 to be fowarded to port 9020 on the same server that my web server is rinning at that is my sshd port
1
vote
1answer
258 views

One website not connecting over shared connection

A website is not opening on a computer that's connected via shared connection (not exactly "shared"). Pinging the website gets Packet filtered message. The setup of my home network is done by Ubuntu ...
1
vote
0answers
8 views

Nodejs remote debugging ports closed

I have a problem with nodejs remote debugging. I'm using centos on remote server and phpstorm on my PC. When I open putty I type the command: node --debug-brk=5858 main_server.js, and get the ...
1
vote
1answer
27 views

Debian 7 - iptables 'filter' not supported?

Am attempting to forward/ masquerade connections from WLAN0 to ETH0 as follows: sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state ...
1
vote
0answers
24 views

Preserve NAT mappings across reboot

My Linux router is able to reboot and reconnect all network interfaces pretty fast (~10 seconds, thanks to systemd and a SSD disk), and comes up with the same IP addresses. Unfortunately the reboot ...
1
vote
1answer
22 views

Trouble with last DROP rule in iptables

Let's say I want four ports to be opened for any incoming packets so I made this ruleset: #> iptables -L -v Chain INPUT (policy ACCEPT 20 packets, 1190 bytes) pkts bytes target prot opt in ...
1
vote
1answer
54 views

Make application use specific network interface

I have an openvpn connection and I need it to work only for one application, this app uses an specific local port. I used route-nopull on my openvpn config file and then: ip route add default via ...
1
vote
1answer
18 views

Filtered port with virtual server setup on a NAT

I have a Symphony SY602 ADSL router and I want configure a dynamic DNS to access my system remotely. I made a NAT virtual server in routers configuration and this is what I configured: Server Name ...
1
vote
1answer
83 views

How to force Google safesearch on entire network

I've a problem filtering web searches on Google domains. Currently I've a linux openVPN Server running with openDNS "family block". I can block a lot of websites with dangerous content and it's ok. ...
1
vote
1answer
111 views

allow incoming ssh with openvpn client

I have set up an OpenVPN client on my home router. The moment the tunnel goes up, I can no longer ping my router from the internet using its WAN_IP. I would like to allow certain incoming connections ...