iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
2answers
962 views

Route wlan0 to openVPN tunnel and rest to eth0

I'm having problems to create route/iptables rules for following configuration: I have an openVPN server (tun type) running on my raspberry machine at home At work i have company pc (behind proxy) ...
0
votes
1answer
28 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
24 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 ...
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
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 ...
3
votes
2answers
1k views

Open and redirect port

I'm trying to set up SNMP for a router so I can monitor it from an existing Nagios installation on an off-site server. I'm having trouble getting the router to respond to SNMP requests from the WAN, ...
-1
votes
0answers
24 views

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

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. ...
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 ...
1
vote
1answer
774 views

DROP all for port 22 if not geoip set of US for iptables and xtables

I want to simply block all ssh access from anywhere but with in the US. This is my whole iptables, and I have followed ...
0
votes
0answers
9 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
0answers
25 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
36 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?
1
vote
2answers
59 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
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 ...
0
votes
0answers
16 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
1k views

iptables redirect traffic from VPN interface to next interface

Can you help me with this problem please? I need redirect all traffic from tun0 interface (OpenVPN tunnel) to eth1 interface. eth1 is internal network behind this system which works as special ...
0
votes
1answer
19 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 ...
1
vote
1answer
30 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
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 ...
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
1answer
18 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 ...
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 ...
4
votes
4answers
6k views

Whitelist IP's in CentOS 7

I want to setup CentOS 7 firewall such that, all the incoming requests will be blocked except from the originating IP's that I whitelist. And for the Whitelist IP's all the ports should be accessible. ...
7
votes
2answers
15k views

Port forward to VPN Client?

I've run into a bit of a puzzle and haven't had much luck finding a solution. Right now I am (sadly) connected to the net via Verizon 3G. They filter all incoming traffic so it is impossible for me to ...
0
votes
1answer
83 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 ...
2
votes
1answer
44 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
2answers
640 views

Policy routing with load balanced ppp connections

This my setup using Debian 6.0. 6. It's role is a proxy server and a load balancer using eight 3G modems. Whenever a ppp connection dials it takes over the default gateway which is ok but it also ...
-1
votes
1answer
53 views

Interfaces, IPTables, Connections, Local Connection - Confused :/

I configured my iptables today and ran into some questions i could not resolve yet. So it would be nice, if someone could verify or answer the following to clarify: Each interface can be configured ...
1
vote
1answer
535 views

Bridged TAP interface to virtualbox

I need bridged TAP interface on client side of my VPN to virtual machine. I use VirtualBox 4.3.12. But in Adapter Network options in Attached to: Bridged adapter I do not see my TUN adapter. I have ...
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
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 ...
4
votes
2answers
1k views

Port fowarding and load balancer in ubuntu server 12.04

I am looking to create a load balancing server. Essentially here is what I want to do: I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a ...
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
104 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 ...
3
votes
1answer
169 views

How to combine iptables rulesets

Say there are several iptables scripts (run at boot time), all of which run something like iptables -A ... to add rules. I'm thinking this could be improved, turning all those shell scripts into text ...
0
votes
1answer
27 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 ...
3
votes
0answers
100 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
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 ...
12
votes
3answers
25k views

How to ensure SSH port is only open to a specific IP address?

This is my /etc/sysconfig/iptables: It has two ports open 80 apache and 22 for ssh. # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. ...
2
votes
2answers
125 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 ...
5
votes
1answer
687 views

What are the definitions of addrtype in iptables?

I am keen to use addrtype in combination with -src as a rule in one of my filter chain like so to drop some bogon ips: -A INPUT -p tcp --dport 80 -m addrtype --src-type UNICAST ! -s 127.0.0.0/8 -j ...
1
vote
2answers
1k views

ping: unknown host with iptables enabled

I can't ping www.google.com. However I can ping the IP address: ping 74.125.237.142 At first, I thought it is a problem with my DNS settings. But I checked my resolv.conf, hosts, and hostname ...
15
votes
3answers
48k views

Iptables to allow incoming FTP

I want to allow incoming FTP traffic. CentOS 5.4: This is my /etc/sysconfig/iptables file. # Generated by iptables-save v1.3.5 on Thu Oct 3 21:23:07 2013 *filter :INPUT ACCEPT [0:0] :FORWARD ...
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 ...
2
votes
1answer
496 views

iptables Port Forwarding — no service with the port

I have setup a network as in the image below: Firewall (FW) running CentOS 6 has two physical interfaces with subinterfaces: eth0:2 — 10.100.1.78/25 eth0:3 — 10.100.1.79/25 eth3 — 192.168.0.21/24 ...