iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

5
votes
1answer
1k views

What are the definitions of addrtype in iptables?

I am keen to use addrtype in combination with -src as a rule in one of my filter chain like so to drop some bogon ips: -A INPUT -p tcp --dport 80 -m addrtype --src-type UNICAST ! -s 127.0.0.0/8 -j ...
4
votes
2answers
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
476 views

PPTP Through IPTables

If this has already been answered, I apologize, I could not find an answer to this during my searching. I am new at Linux/Unix and I have recently implemented a Raspberry Pi firewall/gateway on my ...
0
votes
0answers
24 views

'iptables -a' just hangs and never returns? [closed]

I'd like to redirect requests in on port 80 to a service I already have running on port 8443. I swear I've used this command before on other systems and it's worked: sudo iptables -A PREROUTING -t ...
1
vote
0answers
18 views

redsocks within private network

Is it possible for redsocks to capture traffic within the LAN/Same subnet/private network. I need to proxy ALL the outgoing tcp traffic from a Linux device. The device, proxy server and target server ...
1
vote
2answers
1k views

iptables - Redirect web traffic to LAN Server

I have a webserver which is running on ip address 192.168.11.100 How can i use iptables to redirect all web traffic (http and https) to my webserver on LAN? After that i want to add except list mac ...
0
votes
0answers
15 views

Firewalld / iptables on CentOS 7 - ports are not really being opened after recent update

My problem is that after a recent update I can no longer open any port. I have tried disabling firewalld and opening using just iptables. Ports are being "opened" as on the list that I have from ...
1
vote
1answer
16 views

Using iptables instead of ARP resolution

Due to a particular network configuration, I would like to associate MAC addresses to outgoing Ethernet frames using iptables instead of the ordinary ARP resolution, or at least have the ability to ...
0
votes
2answers
25 views

“ip rule list” command not working correctly on Ubuntu

When I try to execute sudo ip rule list or sudo ip rule the output just keeps scrolling with the following output. This is on Ubuntu 15.04 0: from all lookup local 0: from all lookup local ...
13
votes
4answers
15k views

Viewing all iptables rules

I just wanted to ask if there's a way to view iptables rules in a bit more detail I recently added masquerade to a range of ips iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE ...
3
votes
1answer
68 views

Block all internet connections unless connected to OpenVPN server

I want to block all internet connections unless I'm connected to my OpenVPN. Now of course, I need to allow connection to the VPN server. Can this be done, by allowing out/in traffic to/from the VPN ...
0
votes
1answer
26 views

Does “ip_forward” need to be enabled for any iptables SNAT/DNAT (postrouting/prerouting) rules?

I remember I had to enable ip_forward kernel parameter in the past in order to run SNAT/DNAT rules in iptables successfully. Today I was reading this post: ...
0
votes
1answer
41 views

ubuntu IPTables

I started hosting my game-server on Ubuntu Linux 14.04 I am having an issues ، some enemies/bug abusers log in 2+ characters in the same second then they spam a certain spell/word that lags/stops my ...
4
votes
1answer
40 views

port forwarding to application in network namespace with vpn

I was able to set up a network namespace, establish a tunnel with openvpn and start an application that uses this tunnel inside the namespace. So far so good, but this application can be accessed via ...
11
votes
1answer
9k views

Linux as router with multiple internet providers

Linux as router: I have 3 Internet providers, each with its own modem. Provider1, which is gateway address 192.168.1.1 Connected to linux router eth1/192.168.1.2 Provider2, gateway address ...
1
vote
1answer
1k views

forward packets from one interface to another interface using iptables

I have an embeded system with 2 interfaces e0 and m0, whose ips are 10.0.0.20 and 192.168.0.20, respectively. Incoming packets into e0 have an ip of 10.0.0.10 and should be forwarded to m0 interface ...
3
votes
1answer
19 views

How to manage the source data for iptables -v option?

If I run the command iptables -nvL on my VPS server running Ubuntu I get output like (output is much longer - I have only shown the interesting parts) $ sudo iptables -nvL Chain INPUT (policy DROP ...
3
votes
1answer
55 views

Using iptables to redirect all traffic to local webserver

Aloha, I'm trying to redirect all traffic on my wifi router to a local webserver using iptables. I'm not sure i have got the command right and also I want to exclude the router IP (172.16.0.1) from ...
3
votes
5answers
86 views

Mass IP Blocking

I have a game server and someone is spamming it with bots. The SpamBot client makes the handshake with my server using UDP connections. It does this through a list o proxies. Basically, the Spambot ...
0
votes
0answers
10 views

iptables: route back to source

How can I have iptables route a source back to its source on the same requested port? Example: X.X.X.X comes in on port 22; I want to route X.X.X.X back to X.X.X.X on same requested port; how do I do ...
0
votes
1answer
32 views

How do I see the iptables logs in systemd

I have a system with Debian Jessie. It comes with systemd. I want to see the kernel logs for iptables. I have a bunch of iptables and at the end I want to log what doesn't get allowed. I do it like ...
3
votes
3answers
8k views

How can I make iptables service start automatically after reboot on CenOS/RHEL7?

I am having a few issues with a newly installed home server I am preparing. I have installed CentOS7 on it and I found that port 80 and 443 are off by default. I therefore added them to the iptables ...
4
votes
3answers
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 ...
0
votes
0answers
12 views

Proxy local machine for mitmproxy, iptables borking connection

I want to use mitmproxy on my own machine(Its like tcpdump but for http and an amazing tool), so I made a separate account: mitm_account. then I ran sudo iptables -t nat -A OUTPUT -p tcp -m owner ...
0
votes
1answer
9 views

Add additional allowed IPs

This is what I have used as reference: http://unix.stackexchange.com/a/145933 So if I do: iptables -I INPUT -p tcp -s MY IP --dport 21 -j ACCEPT iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 21 -j ...
0
votes
2answers
1k 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) ...
0
votes
1answer
18 views

Drop all traffic and forward traffic from one port to another with iptables

I have 2 question with iptables: How do I drop all input UDP traffic and port 53? Iptables –A INPUT –p udp –m udp --dport 53 -j DROP is correct? 2 . How to forward all traffic from one port to ...
0
votes
2answers
29 views

IP routing not working

I configured network bridge for my VM. VM can ping host but can't ping anything from internet. My configuration: # ip route default via 192.168.1.100 dev wlp3s0 192.168.1.0/24 dev wlp3s0 proto ...
0
votes
0answers
14 views

Set firewalld on CentOS 7 for Cloudstack service and unistall iptables

I was following Cloudstack installation instructions, when I realized that iptables is not included in the OS, it was replaced by firewalld. So first of all I've shut down firewalld: systemctl stop ...
0
votes
1answer
35 views

no iptables, no selinux, port 81 in virtualhost still not working

I try to open port 81 as a virtualhost. after setting apache, I can CURL localhost:81 from local machine and get response(yes it was listening port 81). However, when visit the same address from ...
0
votes
1answer
20 views

fail2ban ip blocked, yet still login attempts

everything seems ok, iptables shows its blocked, yet I still get auth attempts I have configured fail2ban # "ignoreip" can be an IP address, a CIDR mask or a DNS host ignoreip = 127.0.0.1/8 bantime ...
3
votes
2answers
1k 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, ...
1
vote
1answer
26 views

iptables, allow connections from subnet A to Internet over gateway B

For a university assignment, I need to configure an iptables firewall. I want to allow connections from subnet 136.155.96.37/25 to the internet. The internet is available under the gateway ...
0
votes
1answer
22 views

IP tables - how to configure connections into my compuer

I have a problem with following thing: Foreign connection is connection initialized not by my computer. I would like to accept only foreign connection such that port is 22 or from interval [1000, ...
0
votes
1answer
44 views

ElasticSearch ports in iptables

I have setup an elastic-search cluster with two data nodes, one master node and one client node with kibana. I was running it with iptables disabled on each node. Now I need to enable iptables and I ...
0
votes
0answers
34 views

nginx server never resolves

I have set up an nginx server which is a proxy for port 80 to http://127.0.0.1:3000, but the request never gets through. It just infinitely loads. I have tried sudo /sbin/iptables -I INPUT -p tcp -m ...
0
votes
0answers
27 views

Cannot access server outside of server`

I have a node server listening on port 80. If I send a request to it like this: request('http://127.0.0.1:80',function(err,res,data) {console.log(data)}) It works. It returns what I would expect. ...
0
votes
1answer
2k views

Port Forward :80 and :8080 to Two Different Servers

On a CentOS 6 server with an IP address of 172.16.1.10, how can I configure iptables to route traffic destined for 172.16.1.10:80 to 192.168.1.10:80, and traffic destined for 172.16.1.10:8080 to ...
1
vote
0answers
28 views

Alter DST port on bridged traffic

I need to rewrite the UDP destination port on traffic which is only bridged/L2, but I could not match this traffic via iptables. This traffic isn't going through NAT chains (it could be matched in ...
3
votes
0answers
27 views

Configuring a Linux Wi-Fi access point to redirect a one-word URL to http://192.168.42.1:8888

've created a Wi-Fi access point on a Linux box (thanks to hostapd). I'm trying to make it easy for clients to access the Freenet service that's running on said box. Ideally, the user would be able ...
0
votes
1answer
35 views

nc command and iptables on CentOS7

I have practised in using iptables on CentOS 7 (It is a guest machine on Virtual Box). At first I disabled firewalld: systemctl disable firewalld systemctl stop firewalld Then I installed iptables: ...
4
votes
2answers
714 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 ...
8
votes
5answers
1k views

iptables on tor exit node

I want to run an open Tor router. My exit policy will be similar to ReducedExitPolicy. But I also want to make it hard for the tor network to abuse my resources. Cases I want to prevent clients ...
1
vote
1answer
29 views

Log source IPs of all incoming packets

How does one log the IP addresses of all machines that send packets or connect to the server? Also, how can one block IPs which are involved in a DDoS and are flooding the server with packets?
1
vote
1answer
1k 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
45 views

How to get a deterministic complete dump of all iptables rules?

How to get a deterministic complete dump of all iptables rules? By complete, I mean all tables of iptables. By deterministic, I mean when the command is run multiple times without modifying any ...
0
votes
1answer
1k views

iptables configuration for Transparent squid proxy

I have to setup a transparent squid proxy server using iptables and squid. Following is the scenario: [INTERNAL NETWORK] -> [Main Switch] -> [Proxy Server] -> [Firewall] -> [EXTERNAL ...
1
vote
1answer
29 views

1:1 NAT through VM VPN

I've got a few client servers that I connect to with different VPN clients (e.g. Cisco, OpenVPN, etc). I'm trying to set up an Ubuntu 14 VM (with VPN client permanently connected) for each server to ...
0
votes
1answer
30 views

Debian 8.0 minimal IPtables Persistent not loading on boot

First thing I will say is that I am a really fresh beginner with Linux servers. For my company we are working on a phone system that is running on a Debian 8.0 minimal VPS hosted at Wable.com. ...
1
vote
0answers
8 views

Is there a way to automatically restart docker after updating firewall rules with iptables?

A recent update of iptables and firewall rules caused errors in our app. The culprit was finally found: the docker daemon needed to be restarted. Docker adds own NAT rules to the firewall. A way to ...