iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
19 views

Adding IP Blocklists to OSSEC

I've been reading through some documentations for OSSEC trying to learn some new tricks and such to make it more effective, and what I got really interested was looking into was seeing if it's ...
1
vote
1answer
114 views

IP forwarding through ssh tunnel

The situation involves 3 machines: A. Some laptop connected somewhere to the internet via any mean B. A server connected to the internet through a standard ISP (static IP provided by dyndns: ...
1
vote
1answer
41 views

Is it possible to save iptable rules that have a name for destination instead of IP?

For instance, I have the rule #iptables -A OUTPUT -d www.google.com -j ACCEPT When I type this rule in a terminal it resolves to the appropriate IPs, and that is what is stored in rules.v4 when I ...
3
votes
1answer
373 views

Debian-Jessie: How do you check iptables status?

In old sysvinit I would just do service iptables status and see if it was running or not. But in newer Debian-Jessie I grep for iptables in the list of services and don't see iptables listed anywhere....
4
votes
1answer
83 views

Unable to get NAT working via iptables PREROUTING chain

So, not concerning ourselves with the WHY, and more so with the HOW, I'd like to see if anyone knows where I'm going wrong here. Basically, I'd like to forward all packets headed for port 80 on an IP ...
0
votes
2answers
57 views

Block IP if it connects to port 22

How can I effectively (so do it fast when talking about firewall level and can do it with many-many IP's) block an IP address for a given time, ex.: a month if it tried to contact port 22 TCP in any ...
0
votes
1answer
130 views

redirect to localhost using iptables

I'd like to redirect the outgoing traffic (whether coming from localhost or elsewhere, as the machine is a gateway) going from 192.168.0.2:80 to localhost:80. I've tried setting this rule in the nat ...
1
vote
0answers
41 views

Redirect the traffic of one port to one chain with iptable?

I am very sorry for that I can't describe the title more concretely. I would appreciate if someone can give a better title than mine. On the raspberry Pi, I install the privoxy and a socks proxy ...
1
vote
3answers
111 views

preventing DoS attack in Apache webserver

This is the version of apache we're using - httpd-2.2.15-39.el6.centos.x86_64 We recently had our website down due to DoS attack and hence started exploring iptables, and how to use it to prevent DoS ...
0
votes
0answers
59 views

iptables Dynamic SNAT, how to force to use different src ip from pool?

Requirement: I need to translate a private-ip range to a public-ip range while going out on the internet. It should be a one-one mapping, if public-ip range exhausts it should drop to the next nat ...
-2
votes
1answer
34 views

Execute command with specific routing (ip/iptables)?

I saw great solution for binding application based on some routing table alias... not sure now what it was, but for sure with ip, route or iptables tools... anybody knows the procedure? What was the ...
0
votes
0answers
165 views

Iptables Port Forwarding is not working for Host Only Network. What am I doing wrong?

Host OS Ubuntu with live(public) IP address 1.2.3.4 . And a Ubuntu VM running in Virtual Box with Host Only and NAT network configuration. Configuration of both network cards are according to this ...
1
vote
1answer
110 views

iptables rule explanation

I was looking to update iptables in our webserver which would prevent DoS attack to an extent. 1) Related to web traffic, below are the iptables rules i found. iptables -I INPUT -p tcp --dport 80 -...
0
votes
0answers
101 views

Which iptables chain does a new stream created by TEE go to?

Where do packets go after being created by the TEE target? I am working on mirroring some traffic that needs to go to multiple computers on my network. So what happens to both streams after using ...
0
votes
2answers
397 views

Routing all traffic from eth0 to wlan0

I have a wifi access point that I'm connecting to through my Raspberry Pi on wlan0. I have a DHCP server setup on my Raspberry Pi to give out addresses on eth0. I have an old router setup attached to ...
1
vote
1answer
121 views

Do I need a return at the end of iptables chain?

This is probably an incredibly basic question, but maybe there's some nuance and maybe it's been hashed out ad inifinitum and I'm oblivious to it. I'm making a suite of custom iptables scripts that ...
1
vote
1answer
53 views

Configuring iptables for incoming static NAT

I got a router with ssh access to it, iptables are there waiting for me. I am trying to map any connection to port 1337 on both WAN/LAN to my computer's port 1337. How do I do that?
3
votes
3answers
576 views

Blocking Websites by days and hours using Iptables in OpenWRT

I want to block Facebook the whole day with the exception of the night. I want to implement that in my Linux-based router OpenWRT. The archive I need to modify is /etc/firewall.user (or at least that'...
2
votes
2answers
190 views

Traffic of specific program through vpn [duplicate]

is it possible to only let the traffic of Deluge through a VPN (OpenVPN) and the other traffic not with iptables? Kind regards
2
votes
0answers
57 views

Why could policy routing on iptables marks applied in FORWARD or OUTPUT chains be inconsistent?

I am routing HTTPS connections down a SSH tunnel (-w) using iptables marks and iproute2 rules, the reasons I need to do it this way are contrived, to say the least, so most alternate solutions may not ...
1
vote
2answers
191 views

Opening port on IPTables not working

I'm trying to get Jenkins running on a RHEL 6 server. Jenkins is installed but not accessible due to firewall rules. If I stop iptables with service iptables stop, I can access Jenkins in my browser ...
1
vote
0answers
71 views

How to limit the number of connections per-host passing through a router/bridge?

For some reasons, our Internet provider has a limitation on the number of simultaneous opened connections between the machines hosted in our private network and the Internet which is around 4000 ...
0
votes
0answers
9 views

Why doesn't iptables show my rule? [duplicate]

I ran the following command to configured NAT: iptables -t nat -A OUTPUT -p all -d 57.5.179.19 -j DNAT --to-destination 127.0.0.1 The rule seems to be working as when I make a request to that IP it ...
1
vote
0answers
10 views

One Ip through an interface and all others through another

I have two interfaces, wlp5s4 and enp0s29f7u5. I would like to only use enp0s29f7u5 for 192.168.8.1, but for any other traffic I would like to use wlp5s4 as enp0s29f7u5 isn't actually connected to ...
0
votes
2answers
86 views

Port 8080 and 22 Redirect 2222 doesnt work

I am attempting to open a few ports 8080 and 22 redirecting to 2222. I have selinux disabled in /etc/sysconfig/selinux. I am using 8080 to access Tomcat and Port 22 to have it redirect to 2222. When ...
0
votes
0answers
74 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
32 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
38 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 ...
1
vote
0answers
93 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 ...
3
votes
1answer
422 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
55 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 ...
3
votes
1answer
35 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
276 views

Using iptables to redirect all traffic to local webserver

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 the rule ...
0
votes
1answer
150 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: http://blogs.aws.amazon.com/security/post/...
3
votes
4answers
149 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
26 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 ...
1
vote
1answer
294 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 ...
5
votes
2answers
276 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 ...
0
votes
0answers
68 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
15 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
1answer
53 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
0answers
52 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 ...
1
vote
1answer
123 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 ...
1
vote
1answer
46 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 152.183....
0
votes
1answer
23 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
598 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
74 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
55 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
2answers
39 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 ...
1
vote
0answers
31 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 ...