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
3answers
6 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 ...
2
votes
1answer
14 views

IPSet with IP6Tables ERROR

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

Redirect external request thru VPN

I'm using Centos 5.4 and I'm trying to use the XMPP outside the company. But, the XMPP only works with the VPN. VPN connects and the XMPP become 10.0.2.49:5222 I tried to use iptables using this: ...
0
votes
0answers
6 views

iptables configuration on Windows Azure (CentOS 6.5) for endpoint load-balanced set

I created 2 VMs (CentOS6.5) on Windows Azure for Postgresql database and HA cluster, everything works fine except when I set iptables service on, the endpoint load-balanced set is down. for security ...
0
votes
0answers
11 views

Openvpn iroute traffic to internal network

I have a simple scenario like follows : 3 openvpn clients and an openvpn server , openvpn clients are (C1 , C2 and C3 ) openvpn server is (S1) behind the 3 clients ( C1 a network of 192.168.1.0/24) ...
-1
votes
2answers
19 views

mirroring traffic with iptables doesn't work

i want to mirror specific traffic to ip 192.168.200.1 i use this solution : Mirror Port via iptables but when i enter following command, error occurs: iptables –I PREROUTING -t mangle -j ROUTE --gw ...
0
votes
0answers
16 views

Packets From Inside Not Being Forwared To Outside

I'm trying to forward internal packets to outside without success. iptables -t nat -A PREROUTING -i eth0 -p icmp -d "internal IP" -j DNAT --to-destination "external IP" iptables -t nat -A PREROUTING ...
1
vote
1answer
28 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 ...
9
votes
3answers
10k 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
26 views

Redirect ports with iptables

I need to do redirect port 443 on all interfaces to 8080 on one interface using iptables on a box with 2 NICs. I also need to block pretty much anything else on those interfaces. Here is my iptables ...
0
votes
0answers
8 views

rails ssl setup on Amazon EC2

Environment Amazon EC2 CentOS Rails 4.0.4 SSL certificates installed Chef My Rails config In my environment .rb (staging.rb and production.rb) I added this config.force_ssl = true Started ...
0
votes
0answers
21 views

Allow internet access to intranet only users using Nginx on Ubuntu

I need to allow some users who only have access to the intranet to access one specific internet site. I'm doing this by using Nginx as a reverse proxy. To test this, I would like to block all internet ...
0
votes
0answers
17 views

How do I “socksify” IPv6 TCP connections?

For IPv4, one can use REDIRECT iptables target and redsocks/tcpsocks. How to do the same for IPv6? I've tried ip6tables -t mangle -A PREROUTING -d 2600:: -p tcp --dport 80 -j TPROXY --on-port 4455, ...
2
votes
0answers
37 views

Block all outgoing traffic for a User running Wine apps

Good day, I'm using a lot of WINE apps under Linux which work just fine, but one thing I am specifically looking for right now is to block their access to the internet (outgoing), with exception of ...
1
vote
1answer
2k views

Port forwarding with IPTABLES and VBox

I have a small problem with getting a proper configuration of iptables under Ubuntu. But before, let me describe the network configuration: I am using xDSL line terminated with modem+router+DHCP ...
0
votes
1answer
23 views

block network access to a domain (ubuntu)

I have a few ubuntu servers in various geographies. I want to block all outgoing connections from all ubuntu machines (all processes) to several domains, e.g. www.server.com. I know iptables can block ...
1
vote
2answers
747 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 ...
0
votes
3answers
30 views

outgoing ssh fails from only one machine on lan to outside network

I have multiple servers in my LAN (which I'll refer to as Box1), and they are all able to make outgoing SSH connections, except one that stopped recently, which I'll refer to as Box2 (actually, I'm ...
2
votes
1answer
2k views

How to use NAT iptables rules for hostapd

My PC is equipped with two net interfaces - wlan0 and eth0. I want to use WiFi port as access point on wlan0. So i use hostapd facility and it works properly in routing mode in local network. Users ...
0
votes
2answers
36 views

Wifi sharing over eth0

There are a lot of tutorials how to share network connection with your usb wifi adapter and I tried lots of them but it is still not working. Can you please help me with my problem. Here is my network ...
1
vote
2answers
115 views

Limit incoming connections using iptables per IP

I need to limit access to some port per IP. Let's say 5 connections per minute - not more. I've seen iptables recent, connlimit and limit, but all of them are not fitting exactly what I need. ...
3
votes
1answer
2k 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
0answers
21 views

iptables error “FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c”

When I do this rule, the error shows up iptables -A INPUT -p tcp -m tcp -m multiport ! --dports 80,443 -j DROP I've also found some solutions. getprotobyname() just converts protocol names like tcp ...
1
vote
3answers
77 views

How to block all ports except 80,443 with iptables? [duplicate]

Blocking all ports(in and out) is easy but it's hard with the word "except". I don't know any rules that satisfies the condition. PS: I know this question is nothing new. But in fact, I didn't find ...
0
votes
1answer
19 views

Cant connect to eth0 after wlan0 sharing with iptables

I wanted my Ubuntu server to act as a wifi hotspot. So I set up hostapd to allow wifi connections. I then setup dnsmasq to provide the DHCP settings. I then added the following iptables rules, so ...
1
vote
1answer
3k 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
72 views

Block All Traffic and Allow from Defined IP only in IPTABLES

I want to create a gateway firewall for my network . I want to block all the internal traffic on gateway and allow it from two computers only . On gateway --> eth0 is network card in gateway PC ...
3
votes
4answers
156 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
1answer
35 views

OpenWRT and iptables: redirect all traffic from ip1 to ip2

I'm aware of other questions with the same topic, but I couldn't get it to work. I'd like to forward inside my local network all traffic from ip1 to ip2. Only from inside the network, no outside. I ...
0
votes
0answers
36 views

Route incoming traffic from VPN Clients through localhost-proxy on VPN server?

I’m still quite a newbie to Linux in general and I want to learn by establishing useful projects. My actual project is for a vpn-server to get rid of ads, cookies etc. for all clients. Meaning: No ...
1
vote
3answers
3k views

iptables syntax to forward remote desktop requests to a virtual machine on CentOS host

I can rdesktop into a VM running Windows XP hosted on my CentOS 5.4 machine from the hosting machine and work just fine using the private address (192.168.122.65), but I now need to allow remote ...
1
vote
1answer
29 views

Bitbucket SSH and iptables

I'm a newbie in iptables to be honest. I have some basic rules. Everything is blocked by default. iptables -t filter -F iptables -t filter -X iptables -t filter -P INPUT DROP iptables -t filter -P ...
1
vote
5answers
62 views

How to forward traffic using iptables rules?

I am new to iptables and I have been doing Google searches for a few days now without finding a good solution to this problem. I have computer A with a public ip address (say 192.0.2.1) that can ...
0
votes
1answer
50 views

Granular routing with iptables and iproute2 over VPN

On a host at my house I have a host for a VPN that I need for a couple of purposes. Living temporarily in Japan, it functions as a NAT for some devices so I can still use my NETFLIX and some other ...
2
votes
2answers
2k 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 ...
0
votes
1answer
40 views

Asterisk server firewall script allows 2-way audio from incoming calls, but not on outgoing?

I'm running an Asterisk PBX on a virtual machine directly connected to the Internet and I really want to prevent script kiddies, l33t h4x0rz and actual hackers access to my server. The basic way I ...
0
votes
1answer
59 views

Equivalent iptables command on OS X 10.9

I want to redirect the tcp traffic temporarily to a custom port. On Linux, I use the following command: iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root -j REDIRECT and to ...
1
vote
1answer
26 views

Add IPtables rule by script at the request of another computer

I wonder, is it possible to make an script, which adds rule in iptables by request from other pc? I mean, script "knows" what to do, but addres for rule comes from request. And how do you think it ...
0
votes
1answer
65 views

Iptables mark incoming packet - vpn routing

I have connected my home to my workplace for out of house backup reasons through OpenVPN. The connection is working nicely. At work I have 5 fixed IP addresses. Now I would like to assign one of ...
2
votes
4answers
7k 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 ...
0
votes
0answers
28 views

how to keep counters on iptables rule replace ?

When replacing a rule (by it's number), the counters also get reset. I can think of a scripting solution, though on very high traffic, this loses packets. Is there a way to keep the counters up? For ...
1
vote
1answer
61 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 ...
0
votes
1answer
32 views

iptables: Is it dangerous to filter by source port?

I would like to run a stateless firewall setup and I currently have the following rules: #Do not track any packet *raw :PREROUTING ACCEPT [0:0] -A PREROUTING -j NOTRACK COMMIT #Actual firewall rules ...
0
votes
0answers
96 views

Routing inside Virtualbox Linux Guest on Windows Host connected to WiFI

How can I route a whole net traffic from a laptop (192.168.1.100) connected via WiFi to a router (192.168.1.1) to which I don't have access and cannot mofidy routing table, to other host in this same ...
0
votes
1answer
42 views

IPTables and PPTPd

I'm trying to add the line -A POSTROUTING -i ppp0 -j MASQUERADE to my IPTables in order to allow VPN to have access to the entire internal and external network (eth0, and eth1), but when I try to ...
0
votes
0answers
22 views

I want to exclude the port xxxx from my iptable rule

I want Transmission to use the vpn (tun0) for the torrent stuff, but I also want to access the web interface from my local network. Any suggestions? For the first part, I already tried this.
0
votes
1answer
34 views

How to add iptable support to the kernel (for Wheezy/Sid release)

I am running an ARM processor (similar to the raspberry pi) and my kernel doesnt natively support iptables. If I run apt-get install iptables, it successfully installs but NAT tables are unable to be ...
0
votes
1answer
54 views

iptables --append FORWARD required for routing between NIC alias IPs?

I have an ubuntu box with a single NIC. In order to bind a number of services (like apache, dnsmasq, etc), I have bound them to different alias's (e.g. eth0:0, etc), some of which are on completely ...
0
votes
0answers
25 views

linux machine as two internet gateway connection?

I have linux machine (arch linux) which has there network interface eth0,eth1,eth2 AND two vlan eth0.1 192.168.10.1, eth0.2 192.168.20.1 and two Internet connections eth1 10.0.0.1, eth2 10.0.0.2 how ...
0
votes
1answer
670 views

Using iptables to redirect ip address

I have the requirement on a Linux system where the Linux device is using RSYNC to sync data to another Linux machine. This is working fine at the moment, however I need to move one of the machines to ...