iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
2answers
27 views

output in iptables

I have added the rule to iptables file, however the command does not show it. $ sudo less /etc/sysconfig/iptables Generated by iptables-save v1.4.7 on Fri Oct 24 13:28:48 2014 *filter :INPUT ...
0
votes
1answer
23 views

How to prevent an application from connecting to a network with iptables? [duplicate]

I have read the manual page of iptables in terminal, but it has complicated syntax and I don't fully understand how to use options like: user, user ID, UUID and so on. Suppose my username is foobar ...
1
vote
1answer
28 views

How to enable ping between machines connected in two interfaces?

I have a linux board with two ethernet interfaces as mentioned below. eth0 connected to another linux machine (ad-hoc) eth0 on board 191.168.1.2 connected to Linux machine 192.168.1.3 eth1 on board ...
2
votes
3answers
2k views

Iptables GEOIP not working under Debian Squeeze

I've just installed xtables-*, compiled the geoip database, but when I try to use an iptables command it always gives back the following error: Command: iptables -I INPUT -p tcp --dport 80 -m geoip ...
0
votes
1answer
22 views

iptables | redirect from local [interface:port] to local [interface:port]

0 down vote favorite I have two interfaces eth0 (192.168.1.95) and eth0:1 (10.0.0.100) i want all packet for 192.168.1.95:9900 (from any 192.168/24) will be redirect/forward to 10.0.0.100:9900 and ...
0
votes
2answers
807 views

Route wlan0 to openVPN tunnel and rest to eth0

I'm having problems to create route/iptables rules for following configuration: I have an openVPN server (tun type) running on my raspberry machine at home At work i have company pc (behind proxy) ...
2
votes
1answer
450 views

iptables Port Forwarding — no service with the port

I have setup a network as in the image below: Firewall (FW) running CentOS 6 has two physical interfaces with subinterfaces: eth0:2 — 10.100.1.78/25 eth0:3 — 10.100.1.79/25 eth3 — 192.168.0.21/24 ...
1
vote
2answers
32 views

Impossible to browse web after configuring iptables

I'm trying to configure iptables on my ubuntu computer. These are my rules: Chain INPUT (policy DROP) target prot opt source destination ACCEPT tcp -- anywhere ...
1
vote
0answers
15 views

Shorewall configuration : providers and LAN

Hi all and thanks in advance for the answers. Currently, I have different providers configured in shorewall. I'll will probably have to change one of them. The problem is I won't have any Public IP ...
1
vote
1answer
26 views

Email evading my spam filter

I'm having trouble with email evading my Barracuda Spam firewall. I believe the spammers are using my A Record to bypass my MX Record which is what directs email to my Barracuda for processing. How ...
0
votes
0answers
8 views

failing to tunnel F5VPN through OpenVPN

summary I need to tunnel an F5VPN through an OpenVPN in order to ssh from a client device (Debian laptop) through a firewall. The OpenVPN works, but I lose all networking on the laptop once I start ...
3
votes
2answers
600 views

Policy routing with load balanced ppp connections

This my setup using Debian 6.0. 6. It's role is a proxy server and a load balancer using eight 3G modems. Whenever a ppp connection dials it takes over the default gateway which is ok but it also ...
1
vote
1answer
440 views

port forwarding to internal lan server

I've ppp0 --> eth1 and eth0 (internal lan). I need forwarding externel 10022 port to port 8999 of the server 192.168.1.254 iptables -t nat -A PREROUTING -p tcp -i ppp0 --dport 10022 -j DNAT --to ...
3
votes
3answers
84 views

monitor bandwidth on interface with tc or iptables

I would like to log a warning message to /var/log/messages file if either ingress or egress bandwidth on eth0 interface is over a certain threshold. I could do this with a script which reads the value ...
1
vote
2answers
970 views

ping: unknown host with iptables enabled

I can't ping www.google.com. However I can ping the IP address: ping 74.125.237.142 At first, I thought it is a problem with my DNS settings. But I checked my resolv.conf, hosts, and hostname ...
1
vote
1answer
29 views

Redirect user once using iptables

I have an access point (Raspberry Pi) running Raspbian (Debian). I need it to redirect user visiting specific website to another one, but only when the user visits the first site for the first time. I ...
0
votes
0answers
19 views

why do we have same chains in different tables of “iptables firewall” in linux?

why do we have same chains in different tables of "iptables firewall"? Like for example: we have "output" chain in filter table, nat table & mangle table.
1
vote
1answer
20 views

iptables and RETURN target

I don't understand what the RETURN target does in a iptables command. The doubt comes from this guide where it says: A chain is a set of rules that a packet is checked against sequentially. When ...
1
vote
1answer
593 views

DROP all for port 22 if not geoip set of US for iptables and xtables

I want to simply block all ssh access from anywhere but with in the US. This is my whole iptables, and I have followed ...
0
votes
0answers
9 views

iptables - hairpin NAT dual WAN

Here is my lab Client LAN: 192.168.150.95 Gateway: 192.168.150.1 RDP Server LAN: 192.168.150.2 Gateway: 192.168.150.1 Linux Router WAN: 177.129.XXX.XXX Gateway: 177.129.XXX.XXX LAN: 192.168.150.1 ...
3
votes
2answers
996 views

Open and redirect port

I'm trying to set up SNMP for a router so I can monitor it from an existing Nagios installation on an off-site server. I'm having trouble getting the router to respond to SNMP requests from the WAN, ...
6
votes
1answer
11k views

How to reset all iptables settings?

Are there any simpler commands to these? (e.g.: a oneliner? can one command reset iptables/netfilter settings to this?) IPTABLES="$(which iptables)" # RESET DEFAULT POLICIES $IPTABLES -P INPUT ...
0
votes
1answer
16 views

Where can I find what the latest iptables version is?

I may be blind but I just can't see what the iptables latest version is. I've checked iptables homepage. I've also searched the internet and nothing.
0
votes
0answers
28 views

Unable to ping/SSH web-facing server

I just installed Ubuntu 14.04 LTS onto a box that's set up with one local NIC and one web-facing NIC. The web-facing NIC is configured with a static IP per my ISP. Because networking and security ...
1
vote
4answers
2k views

How to make sense of an iptables chain configuration

This is about how to make sense of the chains found in the iptables default configuration on a typical home router running OpenWrt (a stripped down Linux for router devices), but which ultimately may ...
0
votes
0answers
33 views

Problem with Squid in intercept mode on same machine as browser

It's been a while since I last set up squid cache. I'm trying to set up squid running in intercept mode on the same machine that I use for browsing. I think I've properly forwarded http requests to ...
0
votes
1answer
19 views

unable to block out-going traffic

I've run $ iptables -I OUTPUT -j DROP -d [ip address] and found that some processes are still connecting the destination ip I've blocked above: $ lsof -p [pid] it shows: ...
1
vote
0answers
14 views

How do you tweak iptables limit rules on openSUSE Tumbleweed?

I have a fresh install of openSUSE Tumbleweed, it is logging a lot firewall related stuff due to my apple devices multicasting to enable airplay. Lines look like: Mar 14 12:45:13 server kernel: ...
3
votes
3answers
2k views

iptables: The “script” way or the “*filter, rules, COMMIT” way?

I'm trying to figure out how NAT and iptables work. While I'm in the trial-and-error phase of learning about it, I found two somewhat conflicting howtos. One howto uses a script to call iptables ...
0
votes
1answer
9 views

iptables for Asterisk

I am running Asterisk with FreePBX. I would like to log all failed attempts and after a while ban them. Ideally after 3 failed attempts in 1 minute, ban for 1 hour. Is it possible to see if this ...
4
votes
2answers
1k views

Port fowarding and load balancer in ubuntu server 12.04

I am looking to create a load balancing server. Essentially here is what I want to do: I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a ...
3
votes
2answers
45 views

How to disable network access for a user?

Trying to disable the network access for the user: [root@notebook ~]# iptables -I OUTPUT -m owner --uid-owner tempuser -j DROP [root@notebook ~]# ip6tables -I OUTPUT -m owner --uid-owner tempuser -j ...
1
vote
1answer
25 views

How iptables tables and chains are traversed

I know linux has 3 built-in tables and each of them has its own chains as follow: FILTER: PREROUTING, FORWARD, POSTROUTING NAT: PREROUTING, INPUT, OUTPUT, POSTROUTING MANGLE: PREROUTING, INPUT, ...
2
votes
0answers
51 views

Restrict the maximum number of independent IP connection on specific port at the same time

I set up a server as a socks5 proxy. I'd like restrict the maximum number(1 or 5 or 20) independent IP connection on specific port at the same time. I have searched on google, only see some articles ...
2
votes
0answers
328 views

Redirect all non-local traffic to a socks proxy

Is it possible to redirect all non-local traffic to a socks proxy? so, for example i have: 4 computers (clients A-D: 10.0.0.1-4 or dhcp) 1 computer with 2 network cards (gateway-server, eth0: ...
0
votes
1answer
83 views

iptables - Redirect except list MAC Address

I'm using iptables on my router to redirect all web traffic to my page. But i don't know how to except my mac address list. I did command like this: iptables -t nat -A PREROUTING -m mac ! ...
0
votes
1answer
38 views

Redirect traffic through the server

My task is to redirect traffic (port range) through the server. Here is the schema: Why NAT is not appropriate here: If NAT is set to "Tunnel Server", then all users will be assigned the same IP. ...
0
votes
1answer
833 views

iptables redirect traffic from VPN interface to next interface

Can you help me with this problem please? I need redirect all traffic from tun0 interface (OpenVPN tunnel) to eth1 interface. eth1 is internal network behind this system which works as special ...
0
votes
0answers
39 views

Best way to transparently redirect traffic to proxy

I've implemented a wireless router using hostapd on Debian Wheezy running on a Banana-PI. To access the internet, this router is attached to another network that I haven't any control of via ethernet. ...
0
votes
1answer
27 views

Config iptables ssh over VPN

How can I define a rule that only allows ssh via VPN in iptables? My iptable Rule is following: #!/bin/sh IPT="/sbin/iptables" $IPT --flush $IPT --delete-chain $IPT -P INPUT DROP $IPT -P FORWARD DROP ...
2
votes
0answers
43 views

Why is traffic matching the public zone instead of the desired zone?

Trying to self-train on firewalld I set up apache and configured the zones as follows: [root@localhost ~]# firewall-cmd --get-active-zones work sources: 192.168.122.1 public interfaces: ens3 ...
0
votes
0answers
8 views

iptables-save return with errno 1 - operation not permited

When I run the command iptables-save it returns with errno 1 - opearation not permitted If I do: iptables -L and then: iptables-save then iptables-save succeeds This error happens only ...
2
votes
1answer
80 views

Iptables can't forward from/to internal LAN with proxmox

I have an host with proxmox with single public ip and some virtual machine installed whit webservers and multiple doimains, the first VM is a proxy with haproxy that forward the request to other VM ...
0
votes
1answer
35 views

Switching between Network Interfaces

I am trying to write script to switch between two interfaces on a Linux machine, wlan0 and eth0. My primary reference is: http://askubuntu.com/questions/338100/forwarding-traffic-between-2-interfaces ...
0
votes
1answer
24 views

Nat with saving real client IP

I have this schema: Client -> NAT server -> Game server On NAT server I have the following rules: iptables -A FORWARD -d $MC_IP -p tcp --dport 25550:25580 -j ACCEPT iptables -t nat -A PREROUTING -d ...
1
vote
2answers
80 views

Why do iptables drop / log even if the appropriate packet should be accepted?

I'm setting up a server running Debian Jessie with some applications like iptables firewall, fail2ban, openvpn, apache, ... The iptables firewall is configured in the way, that it logs every packet ...
1
vote
1answer
69 views

iptables allow only ssh and vpn traffic

I have dedicated server with ubuntu 14.10 installed. The server should connect to an openvpn server and the traffic should only go through the vpn, except for SSH traffic. My idea is to realize it ...
1
vote
1answer
33 views

NAT External IP to local server using iptables

I have a adsl connection with static IP (lets say 1.1.1.1). My debian firewall connects Internet with ppp and IP is assigned to firewall directly; ppp0 Link encap:Point-to-Point Protocol inet ...
0
votes
0answers
46 views

Get real IP after OpenVPN tunneling

I try to route traffic from one Server to another using OpenVPN. In the end users should only connect to the forwarding machine. It basically works using this iptables rules: iptables -t nat -A ...
1
vote
1answer
34 views

how to block only certain outgoing ip connection with iptables

(Centos 5.5) to block xxx.xxx.xxx.xxx: # iptables -A OUTPUT -j DROP -d xxx.xxx.xxx.xxx then verify by: # iptables -L OUTPUT --line-numbers Chain OUTPUT (policy DROP) num target prot opt ...