iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
7 views

Iptables restrict all, allow multiple specified users to destination port

This great answer tells me how to prohibit all users from connecting to remote host on specified (in this case 25) port, except one user: iptables -I OUTPUT -m owner ! --uid-owner postfix -m tcp -p ...
2
votes
1answer
894 views

pptpd dead but subsys locked? on cent os

i install point to point tunnel (PPTP) in my VPS. (Cent OS 6 64 Bit) everything fine after reboot the PPTP not worked client side. the pptpd status shows " pptpd dead but subsys locked ". how to ...
0
votes
1answer
36 views

iptables not working with hotspot

I created the rule sudo iptables -t nat -A OUTPUT -d 64.182.208.181 -j DNAT --to-destination 127.0.0.1 Then, when I acess the site 64.182.208.181, instead of execute the normal page of this site, ...
1
vote
2answers
60 views

How to fail fast with iptables?

Inspired by the Pi-hole I set up my own one. What it does: The Pi-hole is configured as a dedicated IP in my local net on a virtual adapter of Raspberry Pi. Get list of known spam / phishing / ad ...
1
vote
2answers
2k views

iptables: what the difference between filter and mangle

I am using iptables to to mark the package and want to route based on the marks. First I added the ip rule: sudo ip rule add fwmark 1 prohibit (The "prohibit" is just for test, I will change it ...
0
votes
0answers
21 views

allow specific ip range to connect to port socat backconnect

So, we have: server 1 and server 2. On server 2 I run the command: socat file:`tty`,raw,echo=0 tcp4-listen:443 To listen for connections from server 1. The problem is, if I visit the IP of ...
3
votes
1answer
210 views

Using iptables to redirect all traffic to local webserver

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 the rule ...
1
vote
3answers
95 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
16 views

iptables on laptop

I am new to iptables and firewall setup in general and have gone through a tutorial for setup of a basic firewall. I'm mostly just learning this for fun. My current input chain looks like this: ...
2
votes
1answer
987 views

Corosync & Pacemaker IPTables Rules

When using Corosync with two rings via multi-cast addresses 226.94.1.1 (Port 5405) & 226.94.1.2 (Port 5406) what iptables rules are required to allow two nodes to communicate optimally without ...
1
vote
0answers
13 views

iptables routing input and forward paths

I would like to know the flow of a packet given the configuration below. Suppose that I setup an adhoc network between my android phone and a NIC on my linux box. I then setup the android phone to ...
0
votes
1answer
31 views

I am facing huge attack of layer 7 on port 3306 can anyone help me?

I am facing huge attack of layer 7 on port 3306 can anyone help me? my iptables rules are good too 184 9568 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ...
1
vote
1answer
41 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. I need help opening port 20 and 21 so I can ftp, but every time I try to it won't save and let me login ...
1
vote
1answer
2k views

iptables allow only ssh and vpn traffic

I have dedicated server with ubuntu 14.10 installed. The server should connect to an openvpn server and the traffic should only go through the vpn, except for SSH traffic. My idea is to realize it ...
2
votes
1answer
3k views

forward packets from one interface to another interface using iptables

I have an embeded system with 2 interfaces e0 and m0, whose ips are 10.0.0.20 and 192.168.0.20, respectively. Incoming packets into e0 have an ip of 10.0.0.10 and should be forwarded to m0 interface ...
2
votes
2answers
1k views

Bonding two broadband connections to serve LAN as a gateway

I need to increase the connectivity and speed of the Internet to my LAN users. These are the things I have in my hand to do so. PC with 3 NICs 1 for LAN and 2 for routers 2 broadband connections ...
0
votes
0answers
45 views

Using iptables to redirect all web traffic to local webserver (on both port 80 && 443)

Firstly, apologies for posting such a similar question to one that exists (Using iptables to redirect all traffic to local webserver). Secondly, I'm somewhat of a newbie to IPTABLES & DDWRT - ...
0
votes
1answer
30 views

Iptables Help redirecting specific TCP/UDP Ports to VPN (tun1)

So I have a linux based router and have a vpn client set up to route traffic through the vpn and isp per iptables commands i am attempting to route specific tcp and all udp ports through the vpn only ...
0
votes
2answers
15 views

iptables open port failed

I want to open 5627 port on 127.0.0.1 with the following command before $ netstat -tln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address ...
3
votes
1answer
926 views

Routing through iptables

I have this vpn client that touches the routing table and then keeps watching it to exit if it gets touched. It is the kind of setup needed for an endpoint, such as a laptop. I want to use a small ...
2
votes
1answer
261 views

LAMP Hardening, Transparent Proxy with iptables

I'm running a LAMP server with FTP(S) and several users. The users have only access to uploading PHP files and other web content. Some are running Drupal and Wordpress, but also a few home made stuff. ...
3
votes
1answer
40 views

Forward ICMP Ping Packets to Interface

I've got a script that listens for ICMP ping packets (containing data payload) and while this works if you run it from command line, it doesn't work in a Docker container because ICMP ping packets are ...
4
votes
2answers
2k views

Iptables GEOIP not working under Debian Squeeze

I've just installed xtables-*, compiled the geoip database, but when I try to use an iptables command it always gives back the following error: Command iptables -I INPUT -p tcp --dport 80 -m geoip --...
0
votes
2answers
1k 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) ...
3
votes
1answer
13 views

iptables LOG only once

I noticed that there are data in the iptables log that I don't need, so I was wondering if it's possible to change some configuration so that the log has less information, thus reducing the log's size....
1
vote
1answer
53 views

xargs: argument line too long

When I run below line in a shell script: /sbin/iptables-save -t filter | grep -- "-A INPUT" | grep -v "fail2ban-\|f2b-" | sed -e "s#^-A#apply_rule /sbin/iptables -D#g" | xargs -0 echo -e "`...
1
vote
0answers
8 views

How is the IMQ device positioned in the packet flow of the Linux kernel

I would like to know the exact position of the following device in the packet flow for ingress traffic shaping: IFB: Intermediate Functional Block I would like to better understand how packets are ...
1
vote
1answer
50 views

How is the IFB device positioned in the packet flow of the Linux kernel

I would like to know the exact position of the following device in the packet flow for ingress traffic shaping: IFB: Intermediate Functional Block I would like to better understand how packets are ...
2
votes
0answers
17 views

VPN with iptables and routing: access port from local network

I use a commercial VPN provider with OpenVPN as client on Ubuntu Server 14.04 LTS (but doing some testing on 16.04 LTS too). I have configured iptables and routing tables to mark packets based on user ...
1
vote
1answer
22 views

Test firewall rules without access to other machines

I'm trying to configure iptables to allow access to certain ports. So I've set up a few rules. One of the rules is to ACCEPT all traffic from localhost. iptables -A INPUT -i lo -j ACCEPT Other ...
2
votes
1answer
35 views

Limiting IP forwarding between certain interfaces/networks

I currently have ipv4.ip_forward enabled to route packets between multiple interfaces. I am now scaling up the system to 8 interfaces, but I want to limit the routing between interfaces/addresses. ...
1
vote
0answers
16 views

If it possible to permanently set a loose source routing option to all ip packages to a specific ip address?

First of all, the loose source routing is a kind of ip options which requires a selected hop to route this package. I wonder if it possible to set loose source routing option on specific ip packages(...
1
vote
0answers
36 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 because it adds its own NAT rules to the firewall. How ...
-1
votes
0answers
22 views

Iptables ports not open

I was set up iptables, I made some forward rules, but the ports are not open for remote acess for exemple. If I'm in the same network of firewall, the Forward rules work well. But if I try to access ...
0
votes
1answer
14 views

Editing the iptables file on Asus firmware

I have downloaded the Asus DSL-n14u firmware, extracted the .trx file and located the iptables file, as linked below: https://www.dropbox.com/s/sanz5x2bw0o5xsu/iptables?dl=0 I know the iptables ...
0
votes
0answers
85 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 ...
1
vote
1answer
547 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 ...
1
vote
1answer
37 views

Temporarily ignore/bypass proxy settings using iptables when WFH

I have an HTTP and HTTPS proxy at my work. Though when I work from home (on the laptop from work) I would like to disable the proxy settings (connect directly to the Internet). Then, when I come back ...
0
votes
0answers
14 views

Multiple Subinterfaces on a Wireless NIC (Ubuntu)

I need to create multiple subinterfaces on a wireless NIC. I have done it on a regular wired NIC before but before I test myself, I wanted to find out from the community if it is possible. The ...
1
vote
1answer
2k views

iptables to allow teamviewer

I'm having some trouble to allow TeamViewer in a restrictive iptables configuration. I'm running Fedora 20. After some research I found out TeamViewer uses ports 80, 443 and I have created this ...
0
votes
1answer
45 views

iptables forward all traffic to 2 different interfaces

I'm currently using dnsmasq to create a small Debian box as a DHCP and DNS cache server. Until today, I had just 2 interfaces (eth0, eth1). One connected to my WAN (eth0) and one connected to my LAN (...
0
votes
0answers
34 views

help with iptables configuration

I want to run two vpns on local host. I want all traffic to be sent first to the first vpn, and then to the second vpn, and no other outside leaks. Could you help me please to realize this? the ...
1
vote
1answer
43 views

iptables configuration

I'm trying to setup iptables, the forward rules are workin fine, but the output rules are making problems. I Can't access internet from the hosts beheind the firewall neither the firewall server can ...
5
votes
3answers
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 ...
0
votes
1answer
34 views

Meaning IPTables command output for 3g connection

Maybe it's a stupid question but somebody can explain me the meaning of this output of iptables command in Android running 3g connection? Sorry, i forgot Chain INPUT Chain INPUT (policy ACCEPT ...
1
vote
1answer
26 views

Block countries based on IP in firewall

I would like to restrict visibility of my server from outside my country. I am connecting to my personal server always from one or two countries. Is there a way to block all the IPs coming from all ...
0
votes
0answers
17 views

Redirect locally generated traffic to a specific network and port to same network but different port?

I am trying to take all locally generated traffic destined for the network 10.100.0.0/24 on port 22408 and redirect it to 10.100.0.0/24:22409. My main issue with doing this is this traffic does not ...
0
votes
0answers
18 views

Troubleshoot routing in rewrite/virtual host

I don't want a solution as much as a way to find the problem. I am learning networking mostly because it interests me and I set up something in my uncle's restaurant. It looks like this. A soft AP ...
3
votes
0answers
41 views

Why “echo f” in the case of clearing conntrack table doesn't work on debian?

Many people don't clear the conntrack table when they want to reload their firewall rules. When you have some ESTABLISHED connections, all the sessions won't be affected when you add a rule that ...
0
votes
1answer
6k views

/etc/sysconfig/iptables : how to block everything except for port 80 and 22?

My new centos 6.5 cloud server came with this /etc/sysconfig/iptables inside we have: # Generated by iptables-save v1.4.7 on Mon Jun 16 20:04:05 2014 *filter :INPUT ACCEPT [8:607] :FORWARD ACCEPT ...