iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
39 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
22 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
138 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
92 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
49 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
175 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
83 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
37 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
307 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 ...
2
votes
2answers
97 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
44 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
82 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
41 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
7 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
8 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
58 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
51 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
21 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
36 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
61 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
245 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
47 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
31 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
135 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 ...
0
votes
1answer
95 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: ...
3
votes
4answers
122 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
21 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
185 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
1answer
171 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
44 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
11 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
45 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
40 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
76 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
84 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
38 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
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
345 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
52 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
38 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
37 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
29 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
36 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
209 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: ...
1
vote
1answer
152 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 ...
1
vote
1answer
55 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
0answers
27 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 ...
1
vote
1answer
53 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
48 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. ...
0
votes
1answer
49 views

How to remove specified IP address from iptables?

I can access to my CentOS server from specified IP address, when I am using VPN, everything is OK. When I am running iptables-save | grep ip.add.re.ss -A INPUT -s ip.add.re.ss/32 -j ACCEPT -A DENYIN ...