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
0answers
26 views

Can't add 81.23.228.129 to iptables because of SERVFAIL - any way round this?

I need to allow the IP addresses of proxy.sipthor.net through my firewall: nslookup proxy.sipthor.net Address: 85.17.186.7 Address: 81.23.228.129 Address: 81.23.228.150 Add these to iptables: /...
0
votes
0answers
14 views

Can't see any website hosted in a node while same issue is not present in other nodes in LAN

Recently we setup a Hadoop cluster with 10 nodes in our Office premises. All of these nodes are installed with CentOS 6. However the issue I'm facing may not be related to Hadoop and accordingly I'm ...
1
vote
1answer
96 views

Limit a range of ip addresses to specific ports using iptables

I am using iptables v1.4.21 on linux. I am trying to limit traffic for DHCP clients 10.0.0.50-10.0.0.100. I would like them to only have access to ports 53,67,80,443,9091,32400 using TCP and UDP. But ...
1
vote
0answers
17 views

How can i implement this iptables configuration with 2 gateways?

I'm trying to configure a firewall hardware to protect my nas. What i want to achieve is explained better with this image below: network scheme While the actual iptables config is the following: *...
0
votes
1answer
162 views

Open syncthing port on raspberry pi

I have just set up a raspberry pi with the raspbian OS. Other than installing LAMP and syncthing, I have not made many changes from the initial setup. I am accessing my raspi through SSH on LAN, and ...
-1
votes
2answers
64 views

Server, laptop, router, and modem, IP addresses?

I have a simple server at home. The server is directly connected to the modem and has IP: 192.168.1.7 My laptop is connected to a wireless router, which is connected to the same modem. My laptop has ...
0
votes
0answers
50 views

Secure settings for a personal OpenVPN IPSEC/L2TP server?

I'm trying to harden my personal server as much as possible. This is the first server I have managed, so I'm also using this as a learning experience. My setup so far: 4096 bit SSH keys SSH is on a ...
0
votes
1answer
53 views

iptables: is it possible to combine “string” and “mac” modules results?

I have a raspberry pi running dnsmasq. I configured all my local devices to use this device to resolve DNS queries. I like to block certain devices using their MAC address from certain queries. ...
0
votes
1answer
27 views

Apache test screen not loading. Connection refused when connecting to public ip

I'm having problems getting Apache to work. I've followed the Amazon AWS instructions (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html) but my computer is refusing to load the ...
0
votes
0answers
42 views

DDWRT - Restricted URLs not working

I have set up URL and keyword filtering in the Web GUI. It is enabled, has the correct IP range, is saved and applied. Yet URLs range are not getting blocked. nvram show | grep shows the filters ...
0
votes
0answers
57 views

OpenVPN client on DD-WRT router. How to block all WAN traffic when VPN is disconnected?

I've successfully configured the OpenVPN client on my DD-WRT router and verified that all traffic is being routed through the VPN. How would configure it such that all WAN traffic is dropped when the ...
1
vote
1answer
67 views

How to add virtual NICs to my linux PC, so that they expose their MACs to ISP's domain?

I have learned how to add virtual NICs to a guest system in VirtualBox, just using Shared Adapter, then all the virtual NICs and my host's NIC will appear as real NICs to the ISP. So I guess there ...
0
votes
0answers
156 views

Create rule in OpenWrt LuCi, apply saved iptables rule from command line

In the OpenWrt LuCi web interface, one can create rules but leave them disabled. I have a rule for forwarding public web traffic to one of the hosts on my private network, but I usually leave it ...
0
votes
1answer
53 views

How to Block all inbound and outbound traffic to and from an Local IP

I need to block entire traffic to and from an Local IP on an WiFi Network, I am using DD WRT Based router, So I Can use iptables. I know the IP Of an Client on the Local Network, Some thing like 192....
2
votes
1answer
920 views

How do you add a MAC-based routing whitelist with DD-WRT and the OpenVPN client?

I have an OpenVPN client set up on my DD-WRT home router which maintains a VPN into my workplace. Slight problem: I don't want random lusers who access my wireless AP to have access to my company's ...
1
vote
1answer
108 views

Iptables route specific port outside VPN (Tomato router firmware)

Im trying to configure my router to what I feel is the perfect setup for me. I have managed to connect the router to my VPN-provider (PIA), and routed such that only one computer connects through VPN ...
3
votes
5answers
15k views

iptables: Allow only HTTP access for web browsing

Have a linux box, want it locked down but just be able to surf internet on it. Why is this script blocking http too? #!/bin/sh # # iptables -F # #Set default policies for INPUT, FORWARD and OUTPUT ...
3
votes
1answer
34 views

Is IPTABLES obsolete when behind a router?

I'm still quite noobish when it comes to networking. I was fiddling around with squid on centos and i was wondering whether turning on iptables when your centos box is behind your isp modem/router has ...
0
votes
0answers
92 views

iptables rule - SSH socks proxy

I have very basic iptable rules for my home server. Block all INPUT except SSH and a few other connections. Allow everything else. When I connect via SSH I sometimes also create a dynamic SOCKS5 ...
3
votes
1answer
945 views

How to isolate networks with a Mikrotik router?

I have recently got a Mikrotik router for my network, and I want to create 3 networks that are isolated from each other but all have internet access: The "main" network for PCs, etc. A network for ...
1
vote
1answer
42 views

ip6tables causing slowness

When running commands like ntpq -p or apt-get update it takes a very long time to display the results. If I remove all the ipv6 rules, everything works fine. I checked syslog, and there's no iptables ...
0
votes
1answer
179 views

Redirect DNS requests using a router and iptables

I have a cable-modem-router from my ISP (Technicolor TC7210Z), and a bunch of wired and wireless devices connected. I want to change the DNS configuration for all devices, but I cannot change it on ...
2
votes
2answers
3k views

How to redirect a port using IPTables 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 ...
0
votes
0answers
43 views

Cannot connect to The Ship Dedicated Server

I am attempting to run a dedicated server for The Ship from my Ubuntu VPS. I have installed the server through srcds, and it seems to start up fine. This is what is shown when I execute "srcds_run": ...
1
vote
1answer
59 views

Samba not accessible via Server name anymore

From one day to another, my samba share (Debian 8 with current Samba 4.1.17) stopped turning up in the windows network neighborhood (Win 10). For a few days it was still accessible by typing \\...
0
votes
1answer
51 views

IPtable rule to limit number of TCP connections on my PC

I have a limit on the number of TCP connections that I can make in my network. If I make more than 100 TCP connections, I get banned for a few minutes. My GoogleChrome in linux opens a lot of ...
1
vote
0answers
327 views

Compile iptables from source make error

I'm trying to compile latest iptables 1.6, but I receive the following error: (./configure it's OK) then I call make and: xtables-config-parser.y:20:28: error: libnftnl/table.h: No such file or ...
1
vote
0answers
48 views

Amazon VPC one way communication issue [closed]

I have 2 sites. 1 - Amazon China: 10.50.0.0/23 with a few instances and one which is assigned with both a public and a private address (let's call it China-GW). This instance has been installed with ...
-1
votes
1answer
116 views

How to speed up dd-wrt iptables command execution

I have a custom firewall script in dd-wrt router. It has thousands of lines in a user-chain like this: /usr/sbin/iptables -t nat -A XXXX -d 1.2.32.0/19 -j RETURN /usr/sbin/iptables -t nat -A XXXX -d ...
1
vote
1answer
772 views

Block traffic to LAN but allow traffic to Internet (iptables)

On my home network I am setting up a CentOS server that will be used by about a dozen or so for educational purposes - e.g. learn how to use the Linux shell and host websites, among other things. I ...
4
votes
2answers
228 views

dhclient unicast DHCPREQUEST excessive logs

I am using centos 7 with dhclient 4.2.5: $ uname -a Linux hostname 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux $ dhclient -V Internet Systems Consortium ...
0
votes
0answers
28 views

iptables tcp over NAT with NFQ

I'm working woth OpenWRT on a router, and would like to catch all traffic over port 1234 with NFQUEUE and set verdict according to packet. I know of snort and surricata, but would like my own package....
0
votes
1answer
115 views

Linux - Squid on local machine to control outgoing traffic

I'm trying to setup squid on my computer to control the outgoing traffic from the same computer only. If my understanding is correct, squid runs as user "squid" on on most Linux distributions (mine is ...
0
votes
0answers
111 views

Iptables MASQUERADE only selected ports

I did port forwarding following this tutorial: http://www.debuntu.org/how-to-redirecting-network-traffic-to-a-new-ip-using-iptables/ iptables -t nat -A PREROUTING -p tcp --dport 1111 -j DNAT --to-...
0
votes
1answer
1k views

Blocking all sites/IP address but Google.se with iptables

Im trying to block all IPs but Google.se. It doesnt work (Site does not display) Here is what I wrote: #/bin/sh echo "Flushing IPTables..." sleep 1 iptables -F iptables -X iptables -t nat -F ...
0
votes
2answers
365 views

How do I forward eth0 to wlan0?

I tried to forward eth0 to wlan0 on my Raspberry Pi B+ using NAT on iptables with the following commands: echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A FORWARD --in-interface eth0 -j ACCEPT ...
0
votes
1answer
769 views

Limit and limit burst in IPTABLES

For some reason I am not able to understand the concept of limit and limit burst in IPTABLES. Could anyone please help me here ! Thank you!
1
vote
1answer
133 views

OpenVPN Routing Port 80 Traffic only DD-WRT

I've setup openvpn client on my dd-wrt to connect to a host a couple states away. Works great(checked route table as well) but I want to only tunnel http traffic. I've always used IPtables for my dd-...
-1
votes
1answer
52 views

How can i open port for microsoft outlook

I use firewall and configure iptables command to block all torrent port in my firewall with iptables. When I add these rules, I can't send and receive email with my outlook with my exchange server in ...
1
vote
2answers
54 views

Need an explanation of iptables rule

Can anyone help me understand the below iptables rule? iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
2
votes
1answer
117 views

No connection between devices in local network

I have home server that also works as router (gateway). It has 2 interfaces one for internet (enp4s0) and another (enp4s1) looks into local network. All devices from local network uses internet from ...
1
vote
1answer
58 views

Access linux device through bridged interface

I'm currently trying to set up a device with a bridge in my network. The device used for the Bridge has two eth interfaces and a wlan interface. I managed to create the bridge from eth1 to wlan0. The ...
2
votes
2answers
330 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
409 views

IPTABLES Rules to rate-limit ICMP(Ping) traffic to 5 packets per second

Trying to figure out the IPTABLES rule for above mentioned requirment. Can anyone please advise me here. I was trying this but not succesful - iptables -A OUTPUT -p icmp -m limit --limit 5/second -j ...
18
votes
4answers
26k views

How can I check if an iptables rule already exists?

I need to add a rule to iptables to block connections to a tcp port from the Internet. Since my script may be called multiple times and there is not a script to delete the rule, I want to check if ...
0
votes
1answer
43 views

Using iptables to bypass VPN based on user

Running the latest LTS Xubuntu and am trying to route traffic from processes initiated by one user (let's say 'jsmith') around a VPN. I think iptables is my only hope here? The relevant adaptors are ...
0
votes
0answers
36 views

How To Setup a Firewall in Ubuntu 14.04 LTS

I have to set-up an Apache web server on Ubuntu 14.04 LTS and a Firewall Server on Another Ubuntu 14.04 LTS . My question is that how to connect firewall server to the next web server after installing ...
1
vote
1answer
102 views

Cannot access internet with current OpenVPN configuration

I am trying to get an OpenVPN server working on my Raspberry Pi. The Raspberry Pi is running Arch Linux with OpenVPN version 2.3.8-2. I'm currently able to connect to the server from the Android ...
1
vote
1answer
97 views

Why can traffic be routed to Privoxy but not Tor using Iptables?

To route http-requests from Interface 10.10.0.0 over privoxy this iptables rule is enough: iptables -t nat -A PREROUTING -s 10.10.0.0/16 -p tcp -m multiport --dports 80,8080,81 -j DNAT --to-...
0
votes
0answers
46 views

Run script after Suricata drops or alarms

I have a Suricata IPS. I want after droping some packets, block their IP in my other servers. I have the command needed to block them. I just don't know how to parse new lines at fast.log and drop.log,...