iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
1answer
15 views

Bridge and iptables postrouting

I have a Linux 3.14 PC with three NICs and a bridge between two of the NICs (eth1 and eth2). My Question Why is there no traffic passing through the POSTROUTING rule? FYI, traffic is passing ...
0
votes
1answer
22 views

Effect of limiting tcp connections through iptables to limit ssh sessions

I have limited no. of tcp connections through iptables to limit total number of ssh connections. Now when i am adding a rule with maximum limit of tcp connections lesser than currently opened ssh ...
-1
votes
0answers
24 views

How can my bridge assign public ip to my users? [on hold]

I am using two machines - 1st has an IP of 10.10.10.10 and 2nd has an IP of 10.10.10.11. I will configure bridge on machine 2nd . I want to assign them an private IP of the range: 172.16.0.1-50. ...
0
votes
1answer
12 views

Docker: personal ip but another network

Recently i found this for give to docker a "personal" ip ip addr del 10.1.1.133/24 dev eth0 ip link add link eth0 dev eth0m type macvlan mode bridge ip link set eth0m up ip addr add 10.1.1.133/24 dev ...
2
votes
1answer
21 views

Use two SSH ports, but open only one?

My iptables.conf looks loosely like this: -A INPUT -p tcp --dport 65000 -j ACCEPT -A INPUT -j DROP My sshd_config looks like this: Port 22 Port 65000 #AddressFamily any #ListenAddress 0.0.0.0 ...
0
votes
0answers
8 views

GUI for NFTables, like fwbuilder

We have several clients where we use linux based (iptable) firewalls. To manage the rulesets we currently use fwbuilder to manage the firewalls and the relations between the different firewalls. So ...
2
votes
1answer
7 views

Routing problem from internal eth1 interface to an external ppp0 interface

I'm trying to connect two LANs using a ppp link. I had a basic network topology diagram but it didn't come out well. This can be seen here. Routing Problem ================ 172.20.0.0/16 ...
2
votes
0answers
21 views

Two ISP and redirecting traffic

I have a gateway with two ISP connected to eth0 and eth2. There is also a eth1 with local network. I'm trying to group some services in one interface and some in the second: incoming traffic 1 ...
2
votes
1answer
34 views

iptables to block all websites

I have Debian 7, and I want to block all websites in my computer, unless my email, using IPTABLES or others firewall. How can I block all website, include http and https too. How can I do this?
0
votes
0answers
15 views

Delaying packets with libnetfilter_queue

From my Raspberry Pi configured as an access point, I set the following rules: sudo iptables -I FORWARD -p tcp --sport 25 -j NFQUEUE --queue-num 0 sudo iptables -I FORWARD -p tcp --sport 80 -j ...
1
vote
0answers
11 views

Why does a broken mount point break netfilter-persistent using systemd?

I have a relatively clean Debian Jessie install. I'm running into two related problems: 1) I have a cifs mount that shows me an error on boot. The error says to run systemctl status ...
0
votes
1answer
17 views

Forwarding traffics come from SSH tunnel to VPN tunnel on a Linux device

I want to route network traffic that comes from one end of ssh tunnel (constructed by ssh dynamic port-forwarding) into one end of VPN tunnel. Given four linux devices A, B, C and D, for example, I ...
3
votes
1answer
149 views

Which ports should I open for apt-get to work?

I installed Webmin, and then set up the firewall like this: INPUT SSH port ALLOWED Webmin port ALLOWED HTTP port (80) ALLOWED DROP EVERYTHING ELSE FORWARDING no rules OUTPUT no rules If I remove ...
1
vote
2answers
58 views

Error when redirecting ports with iptables: No chain/target/match by that name

I am trying to redirect all incoming TCP connections, originally to port 80, to port 8090, because I am running Confluence in 8090 and I want to avoid it running as root, which is a requirement to ...
1
vote
1answer
27 views

How check a port forwarded from localhost to localhost on.. localhost?

I'm learning about iptables, firewalling, routing and so on. I'm on Linux, Centos7, and I've set up a local port forwarding to localhost with: firewall-cmd ...
0
votes
0answers
13 views

How to block connections to specific file path

I have a server with cPanel/WHM installed. Now I want to block a specific path (example: /gate.php) to all users and prevent access from the Internet, so what is a good way to do it using iptables or ...
0
votes
1answer
37 views

How to get RX and TX bytes querying iptables?

My intention is to monitor traffic from/to wan. To achieve that, i want to calculate outgoing and ingoing bytes/second, with iptables counters as data source. Unluckily, I'm not able to understand ...
1
vote
1answer
17 views

Packets not forwarded due to second routing table

I've just spent about an hour trying to understand why my docker containers couldn't connect to the internet, in particular couldn't resolve any DNS names. By now I've found a workaround, but I still ...
2
votes
2answers
35 views

how to check if iptable rule is working

I am new to iptables and networking in general, so I am experimenting with it. I am learning how to close ports; in particular I am trying to close a specific port on the host machine, so another ...
0
votes
1answer
39 views

Forward all traffic from Android to Ubuntu server running privoxy (iptables)

My university has installed a non-transparent restrictive proxy which allows only traffic through 80 and 443 ports. Currently, I have my android phone (Nexus running CM12.1) pointing to my Ubuntu ...
0
votes
1answer
80 views

Redirect proxy traffic through another IPv4 address

I have a CentOS 6 box running Squid and Privoxy to create a custom proxy setup. The server has several public IPv4 addresses configured on virtual eth0 interfaces. My Goal: I want to send all proxy ...
0
votes
1answer
21 views

Allow INPUT only on one specific port?

I want to be able to be able to connect to 1.1.1.1 through port 110 to send email. I currently have the following set iptables -A OUTPUT -d 1.1.1.1 -j ACCEPT But it replies with the error 01:37:39 ...
1
vote
2answers
25 views

iptables block all inbound and outbound traffic except for my IPs

Previously I asked how to block all traffic except for specific IPs however that wasn't enough. I need to block all outbound/inbound except for my IPs. I don't want to be able to ping/connect to any ...
0
votes
2answers
98 views

Debian 8 - Update Iptables on boot

I am in the process of porting my "configure openvpn server" from ubuntu 14 to debian 8. So far it works well except for this section: # Set up iptables to forward packets for vpn and do this upon ...
0
votes
1answer
26 views

Debian network disappearing

I'm running Debian v8 (systemd purged and systemV installed ... works fine). It is a clean installation (Debian v7 used to be on this machine) The harddrives failed after numerous power failures on 1 ...
-2
votes
0answers
28 views

Block all incoming IPs? [duplicate]

I need to block all incoming IPs for all services except my IP 1.2.3.4, apache, ssh, everything. I still need to be able to contact other servers though. How can I achieve this?
1
vote
0answers
36 views

Iptables - Limit SMTP output traffic

I'd like to limit the output smtp traffic of my server (Debian). For example : only 10 mails per seconds. I want to use Iptables for this purpose. I tried : iptables -A OUTPUT -p tcp --syn --dport ...
2
votes
1answer
43 views

NAT box with multiple internal and external interfaces

Similar questions have been asked before but my setup is a little different and the solutions to those questions are not working. A have a CentOS 6 server running iptables with 5 interfaces: eth0: ...
3
votes
0answers
91 views

Is it possible to throttle upload bandwidth per `IP` basis using `tc`, `htb` and `iptables` ? (Download limitation not required)

Problem I've searched internet like anything but couldn't find much about limiting upload. The solutions given are not limiting IP basis like this one but LAN as a whole. +-----+ ...
2
votes
2answers
124 views

Block all IPs from accessing anything on the server

I want to block all IPs except for my own home IP from doing anything on my server. How can I do this with iptables? For the example lets say my home IP is 1.2.3.4 My server still needs to be able ...
2
votes
1answer
56 views

How to Mark Traffic using IPtables?

I'm trying to mark traffic, How shall I write following code in terms of IPtables? /ip firewall mangle> add chain=prerouting src-address=10.1.1.1/32 action=mark-connection \ ...
2
votes
0answers
50 views

How to explain strange kernel messages?

I have a server running on Debian Wheezy 3.2.68-1+deb7u1 x86_64. Lately strange records in /var/log/messages appeared. First messages of this log starts just after server reboot. 6.222.18 LEN=44 ...
1
vote
0answers
24 views

Privoxy - Annoying Error Used IPTables

I'm running privoxy off a machine that also has hostapd installed, I am trying to run all http traffic from hostapd through privoxy i have already tried this: iptables -t nat -A PREROUTING -p tcp ...
1
vote
1answer
23 views

Are iptables global or user ip specific?

For example for my web server port I have the following rule: iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m limit --limit 1/m --limit-burst 15 -j ACCEPT #If you spam concurrently for 15 ...
0
votes
0answers
14 views

iptables presale me to ssh access or calling methods remotely

I have a linux openwrt unit. At its start, I can not make a ssh access if I do iptables -F. If I use iptables -L -n -v, I find several rules that are automatically inserted and it prevents me from ...
0
votes
1answer
51 views

How to block telnet using iptables command

I am trying to block telnet on my server but I have failed to do so. I have added following firewall rules in INPUT chain of filter table for the same. INPUT CHAIN(filter table): <some other ...
1
vote
2answers
54 views

iptables configuration - ssh connection only from a remote network

I'm trying to configure Iptables of a server in order to permit SSH incoming connections only from a certain network. by the way this is the rule chain : # Drop anything we aren't explicitly ...
2
votes
0answers
36 views

ip rule not acting on fwmark

I'm trying to use iptables to load balance web traffic over multiple DSL lines by marking the packets and routing based on the mark. I'm working with CentOS 6.6, Kernel 2.6.32-504.16.2.el6.x86_64, ...
1
vote
1answer
52 views

AWS Outbound ACL Rules impact on incoming ssh connections

I am making a bastion ssh server on CentOS 7 in an AWS EC2 instance. When I use the following rules in its ACL, I am able to connect to the server just fine: Inbound Rules Allow traffic on port 22 ...
1
vote
1answer
31 views

What ports will an ssh daemon use outbound?

I am making a bastion ssh server. When I use the following rules in its ip tables, I am able to connect to the server just fine: Inbound Rules Allow traffic on port 22 from my client's IP Block all ...
1
vote
1answer
24 views

Audit on changes to the running iptables configuration

I'm aware of how to audit for changes to the /etc/sysconfig/iptables file in CentOS/RHEL 6 and earlier, but how do I audit for changes made only to the running configuration?
2
votes
2answers
40 views

IPTABLES to allow ssh, ftp, pop, etc from one static IP address with HTTP/SSL open to public

This is my setting in /etc/sysconfig/iptables: #start of my iptables # Generated by iptables-save v1.2.11 on Wed May 27 00:31:22 2015 *mangle :PREROUTING ACCEPT [130933577:29488298585] :INPUT ...
0
votes
1answer
36 views

Modification needs to be done in iptables in case of a bridge between two interfaces is implemented

I have a machine with 2 NICs; eth0 and eth1. Each NIC has an assigned IP address and the traffic between them is controlled using the below script. #!/bin/bash SAT_RECV="192.168.200.0/16" NQ=9 ...
1
vote
1answer
20 views

Using a VPN for certain applications via a network namespace

I am trying to use a network namespace for VPN-specific traffic, using this guide: https://schnouki.net/posts/2014/12/12/openvpn-for-a-single-application-on-linux/ on Debian. Everything works with ...
0
votes
0answers
38 views

Why is my laptop being blocked from connecting to a PPTP VPN server?

I have a fairly simple network at home Internet --> Modem --> Linux Router --> Switch --> Laptop The problem: There is a PPTP VPN server at work that I need to connect to from home. I configured my ...
1
vote
1answer
55 views

Blocking or forwarding packets as access point

I set up my Pi 2 as a wifi access point following this tutorial. I'd like to implement a rudimentary QoS, according to the DSCP field in every packet's header. That means, blocking packets using low ...
3
votes
4answers
159 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 ...
0
votes
1answer
23 views

FTP passive mode, fails

Hi I am trying to setup iptables to allow FTP. When I connect with FTP, i get the following message in my filezilla. Status: Connected Status: Retrieving directory listing... Command: PWD ...
0
votes
1answer
55 views

to allow certain ips and block all other connections on AMAZON EC2 ubuntu 12.04

How do I allow certain IPs and block all other connection in iptables on AMAZON EC2?
2
votes
2answers
84 views

How can I allow SSH and SMTP only using IPTables?

I've got a raspberry pi set up to send me periodic emails. As it's connected to the internet 24/7, I need IPTables set up properly. I want to allow incoming SSH and allow emails to send out on port ...