iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
2answers
13 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
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 ...
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 ...
1
vote
0answers
21 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
69 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
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 ...
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 ...
0
votes
1answer
28 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
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 ...
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 ...
0
votes
0answers
13 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
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
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 ...
1
vote
1answer
27 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
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 ...
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: ...
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 ...
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
0answers
9 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
30 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. ...
0
votes
1answer
28 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 ...
1
vote
1answer
45 views

FreeBSD equivalent of Linux's “xt_bpf” filtering module

In Linux 3.9 there's a packet filter module called xt_bpf that can take compiled BPF bytecode and use it directly in an iptables rule. Is there any equivalent for FreeBSD's ipfw system?
1
vote
0answers
20 views

iptables Forward port range on dd-wrt for proxmox vnc

I am running proxmox on my LAN and DD-WRT for my router... I want to use cloudflare with proxmox, but cloud flare only allows these ports(https): 2087, 2096, 8443. But proxmox VNC ports are ...
-2
votes
1answer
25 views

What happens if I block ssh connection from any IP address? [closed]

Does it any good for security, if so why developers put it in, in the first place? I just started learning about iptables and i wonder why there is such an option? What does it do?
0
votes
0answers
48 views

Limit upload speed to port 80/443 per ip address

I'd like to implement a max-upload speed to protect my server that accepts uploads. I'd like to throttle inbound to 80 and 443 to 1 Mbps. I know it can be done with iptables/tc but I can't figure it ...
0
votes
1answer
25 views

Can't access web sites when running iptables script!

I have wrote script for protecting my machine: #!/bin/bash ssh=1.1.1.1 http='1.1.1.1 2.2.2.2' # Clear any previous rules. iptables -F # Default drop policy. iptables -P INPUT DROP iptables -P ...
0
votes
0answers
18 views

multiple firewalld services with source addresses

If I have three services: port 111 should only be accessed by IP 192.168.1.111 port 222 should only be accessed by IP 192.168.1.222 port 333 should only be accessed by IP 192.168.1.333 ...
1
vote
1answer
42 views

Managing iptables for specific ips and ports

I disable firewall like so: #!/bin/bash iptables -F iptables -X iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT Update I also enable my firewall: #!/bin/bash ...
1
vote
0answers
11 views

What puts TCPMSS in iptables?

I used to have (well, I still sort of do) have a script that expects: -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu to have been entered in to iptables ahead of my ...
1
vote
1answer
40 views

Strange behaviour of whiptail

My code: read -ra var <<<$(sed -ne's/^ *:\([[:upper:]]*\).*/\1/p' /etc/sysconfig/iptables) chains=$(whiptail --title "Add rule" --menu "chains" 16 78 5 "${var[@]}" 3>&1 1>&2 ...
1
vote
1answer
37 views

Firewalling Samba

at the moment I'm trying to implement the firewall for my linux file server. Everything is working as expected except form the samba server. I have searched through the internet already but non of the ...
0
votes
0answers
42 views

IPTables if more than 30 connection in 1 minute ban IP for 1 hour?

I am trying to setup a firewall that limits to 3 connections per IP and also ban the IP for an hour if > 30 connection attempts in one minute. Is this all possible with iptables? So far I have only ...
3
votes
0answers
23 views

connlimit counters start over after iptables restored

I have a connlimit rule in iptables that allow only 5 connection to port 80. iptables -A FORWARD -p tcp -m tcp --syn --dport 80 -m connlimit --connlimit-above 5 --connlimit-saddr -j DROP This ...
1
vote
1answer
34 views

Characterizing iptables impact

Circumstances force us to open a port to the internet and we want to set up a "white list" of IP ranges that are allowed to access that port. I have prototyped the solution so I understand the ...
0
votes
0answers
51 views

after masquerading , proxy server not work

In normal mode i can get site content with proxy server (tinyproxy): curl https://anysite.any/ or curl -x 127.0.0.1:8888 https://anysite.any/ BUT, i want enable iptable masquerading for some ...