iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
1answer
68 views

What am I doing wrong when trying to open port 8080 on iptables using Ubuntu?

I'm trying to open port 8080 so I can use a web panel application (McMyAdmin) I have installed on my Ubuntu server. I'm rather new to Linux / SSH in general but I'm getting there thanks to various ...
1
vote
1answer
31 views

unmanaged vps centos6.4 need to open port 20/21

I brought an unmanaged vps which is running Centos 6.4 and the only port which was open was 22 and I need help opening port 20 and 21 so I can ftp, but every time I try to it wont save and let me ...
0
votes
2answers
32 views

Count Bytes by Ports

Using RHEL/CentOS 6.7 -- I want to be be able to know byte counts on IPv4 ports. We have thousands.. I would think counting via IP Tables for that would be a bit unweldy and slow the firewall a wee ...
1
vote
1answer
45 views

Iptables rules doesn't work as expected

I need to block access to my server from the outside of my private network. I need to allow pings from my server out only to my private network and answer pings initiated from my private network as ...
1
vote
0answers
36 views

How to not going through openvpn tunnel for a specific port

After long hours of digging and many tries I still cannot figure out how to not have a traffic on a given port going through the openvpn tunnel. Below my setup: (enp0s25)<ovpn server>(tun0) ...
1
vote
0answers
32 views

How to block access to “private” host-only network from VirtualBox nat interface (separate host-only networks)?

Scenario: 1 VirtualBox host with many vms. Different host-only networks are configured for different vm categories: Some vms are "private", others are "standard" vms. Most of these vms, including some ...
2
votes
1answer
36 views

How do you block a port on your loopback?

I am doing some testing and want to be able to test situations where my database goes down. Its running on the same box as my tests, and it appears that things like the following are not doing the ...
0
votes
1answer
35 views

ip tables by route command and iptables's table by iptables command, is the same?

There are two command : route, and iptables. Both of it have a/many tables: route tables and iptables's table. Does those two kind of tables describe the diffrent thing, or iptables can also be ...
0
votes
1answer
29 views

iptables - How to allow all connections to the local lan?

What's the simplest way to express "allow all connections to the local lan" for iptables output? Including connections to 192.*, 172.*, 10.*, etc. Can all of this compressed within a single rule?
0
votes
0answers
24 views

Setting up VPN on Linux

I have problems setting up networking on my laptop over VPN. I need to connect from my home to VPN which has the same IP address space as my home network. My network: 192.168.0.0/24 Other side of ...
0
votes
1answer
23 views

Can't access webmin due to iptables missconfiguration

I installed webmin, but I cant access it because iptables blocks the connection. I have added the chain that webmin suggests right here: http://www.webmin.com/firewall.html This is the result of ...
0
votes
0answers
12 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
87 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
37 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
101 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 ...
3
votes
1answer
47 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
40 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
71 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
27 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
75 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
33 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
20 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
107 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
84 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
31 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
110 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
69 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
36 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
229 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
61 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
0
votes
0answers
16 views

Why Do I get a Connection Refused after a few moments of Connectivity?

I have a cloud server that has been working up until now. It is key based (no password) and has a honeypot server set up that redirects Port 22 -> 2222. Here is what I have for iptables: -A INPUT -p ...
2
votes
0answers
41 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
60 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
39 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
48 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
48 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
46 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
175 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
30 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
106 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
78 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
114 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
18 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
160 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
142 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 ...