iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

2
votes
0answers
49 views

Dropping packets before mangle POSTROUTING

In iptables on Linux 3.10, why do packets which have been DROPed by the FORWARD chain of the standard table still appear in the POSTROUTING chain of the mangle table? -- I'm trying to use the standard ...
1
vote
0answers
82 views

Shorewall on router keeps blocking apt-get update on virtual guest

I have a dual-IP LXC server with several unprivileged containers configured for three users. Each user has his own bridge: lxcbr0, lxcbr1 and lxcbr2. For efficiency, the host runs apt-cacher-ng. Each ...
1
vote
1answer
90 views

Redirect traffic destined for IP and port

I have a program that wants to connect to 1.2.3.4 on port 5678, but it can't because the port is blocked on our network. However, I do have an SSH tunnel set up that redirects localhost:5678 to ...
2
votes
2answers
65 views

What does this iptables rule mean?

Reading this article on how to configure OpenVPN, I see the following paragraph: Raspbian has a firewall to protect your Raspberry Pi from unknown and unexpected Internet sources. We still want ...
0
votes
2answers
112 views

Forwarding a Localhost:Port to an ExternalIP:NewPort

We have got an application running on our linux server. From that application, when we try and access localhost(127.0.0.1):localport, it should be forwarded to an external IP. Users will only try and ...
1
vote
1answer
61 views

iptables, differentiate ports based on hostname

Is there a way, using iptables, to ACCEPT traffic from HOSTNAME1, HOSTNAME2, HOSTNAME3 to port 22 and FORWARD traffic from everyone else to a different port and make the rule persistent? ...
0
votes
1answer
66 views

How to unmask an IP with iptables?

Is there a way to unmask an IP using iptables? I know to mask all-in-one is following by: iptables -t nat -A -POSTROUTING -j MASQUERADE Thanks in advanced.
1
vote
1answer
94 views

iptables: route packets to example.com via public proxy

I want to access certain websites via a public proxy and I can't seem to get it right using iptables. Let's say I want to access example.com having ip address 1.2.3.4 via a public proxy at ...
2
votes
3answers
169 views

How to make Raspberry Pi to receive an IP from a router and also pass another IP to another device?

I know that I could achieve the desired result with an Ethernet switch, but I'm curious if I can get this with some cheaper solution. The idea is as follows: Rapsberry Pi has two Ethernet ports - ...
2
votes
1answer
205 views

How to use both syn proxy and connlimit rules with iptables?

I want to write both syn proxy and connlimit rules. I want to send packets to syn proxy first because of performance issue. Here is rule sample. I use bridge interfaces but I dont think it is ...
2
votes
0answers
57 views

debugging iptables when tunneling one VPN through another

I seek to tunnel one SSL VPN (F5, running on my debian laptop==client) through another (OpenVPN, running on a debian linode==server), but lose all client networking (including, e.g., ping) after the ...
1
vote
0answers
106 views

iptables / VLAN: interface names

I have just started working with VLANs. My memory was VLAN interface names are the interface name plus dot plus the VLAN ID. And that is what vconfig offers. After some (successful) manual tests I ...
0
votes
1answer
424 views

iptables configuration for Transparent squid proxy

I have to setup a transparent squid proxy server using iptables and squid. Following is the scenario: [INTERNAL NETWORK] -> [Main Switch] -> [Proxy Server] -> [Firewall] -> [EXTERNAL ...
0
votes
1answer
58 views

Using IPTables to block all connections but still be able to backup vServer

my vServer / webserver (OS: Debian squeeze) got hacked and compromised. Therefore I want to use rules in IPTable to block all input and output connections except ssh. Afterwards I want to backup at ...
0
votes
3answers
214 views

Unknown cause for redirect on 80 port

I have an Ubuntu 14.04 server with Apache 2.4.7 running there, hosting one site on 80 port. Today I discovered that every request to 80 port redirects to another website with response: HTTP/1.1 301 ...
0
votes
0answers
93 views

[Solved]No problem connected by filezilla, but cannot get list when connected by linux CLI client

I built FTP server by VSFTPD, on Raspberry pi, and Inside NAT. Surely set port-forwarding and, it perfectly functional when I connected by filezilla. But, I can't execute LIST(dir) when I connected ...
0
votes
0answers
104 views

DNAT forwarding for FTP: No route to host

I have a single public IP for multiple VM, i need forward multiple ports for FTP service, i write these lines: iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 20:21 -j DNAT ...
1
vote
0answers
112 views

netfilter rules to forward all traffic to a local website by default, and making exceptions to that rule by macaddr

This is for raspbian acting as a gateway. computers -> [eth1] raspberry pi (dhcp) [eth0] -> modem/router -> internet I made an ip forwarding rule which redirects all traffic coming from eth1 ...
1
vote
1answer
34 views

Virtulisation IPTables Rules

I haven't been able to find a solution this as of yet. I'm not very experienced in IPTables so any support you can provide will be appreciated. I have a server with a few VMs on there. The main node ...
1
vote
1answer
287 views

Iptables rules for remote mysql server

I have a local mysql database on a centos server which causes a lot of load because there are a lot of queries made towards it. I want it hosted on its own server but i dont want every single ...
1
vote
1answer
65 views

What considerations would I need when configuring iptables?

Synopsis I am looking at learning more about Server Administration. I have been running my own web server for a few years although many things were set-up by my friend and now I wish to learn more ...
3
votes
1answer
188 views

How to combine connlimit with IP sets?

connlimit lets me limit the number of connections per client/service. How would I go about to combine such a rule with the IP sets available in more recent versions of the Linux kernel and netfilter?
0
votes
1answer
76 views

Connection lost to VPS While using iptables by default policy as DROP for INPUT, OUTPUT, FORWARD

I'am using iptables in many server's but now stuck with this issue while using default Policy as DROP. Here is my rules which i have used in VPS, Tried many time's everything seems fine but VPS ...
1
vote
1answer
29 views

How to carry a string over from one chain to another in iptables?

Here's what I'd like to do. In my rule file (which I use with iptables-restore) I have (with limits removed): -4 -A LOGDROP -j LOG --log-prefix "ipt:4:drop " -6 -A LOGDROP -j LOG --log-prefix ...
3
votes
0answers
174 views

iptables: using “conntrack” and “recent” modules to block unsolicited packets

When I only allow RELATED and ESTABLISHED packets, and DROP everything else, my firewall rules work perfectly and I have no problems: ### VARIANT A -A INPUT -i wlan0 -m conntrack --ctstate ...
1
vote
1answer
58 views

Observing ping replies under DNAT

I'm confused while trying to understand the DNAT mechanism under below circumstance. My understanding: DNAT = Destination Network Address Translation: Functionality which translates the destination ...
2
votes
4answers
109 views

How can I lock myself out of a linux box with iptables?

In the Securing Debian Howto I read (about iptables): The tools can easily be misused, causing enormous amounts of grief by completely crippling network access to a system. It is not terribly ...
2
votes
1answer
134 views

How do I apply iptables SNAT to packets bound for localhost (INPUT chain)?

I'm setting up a host that has two routes to the public internet: one via my run-of-the-mill home gateway router, the other via a gateway router on a semi-private network (AMPRNet on 44.0.0.0/8). Most ...
0
votes
1answer
163 views

BIND/DNSMASQ query hanging on ubuntu server 14.04.1

I'm testing out a BIND and DNSMASQ configuration on my VPS. When I run a program which submits a bunch of queries (around 10-20 per second) my DNS replies stop coming back for a random amount of time. ...
0
votes
1answer
100 views

iptables rules for machine running as openvpn server

I set up an older laptop as an OpenVPN server for my home network (and a dwarffortress server, but that's beside the point). This is the first time I've set something like this up - I wanted a secure ...
1
vote
0answers
121 views

Redirecting all non-local traffic from specific ip to external proxy

I currently have a squid proxy running on an external server (outside the LAN, with a public IP). I would like to route all non-local traffic from a specific device through it. That is, any requests ...
1
vote
2answers
189 views

Redirect outcomming traffic to local server

I have a Apache web server set which listens on port 4000 and I want to use this (local) server as a kind of proxy. The idea is to redirect all the local outcomming HTTP traffic (port 80) to my ...
2
votes
0answers
43 views

Strange cron behaviour

I have a script that reads a list of IPs from a file, compares with the existing ones in a chain, and adds recently added IPs in the file into that chain. Running the script manually (e.g., ./script) ...
-1
votes
1answer
47 views

iptables routing through firewall

I have a httpd service running on server machine, I have a firewall and internet browser on desktop machine. On server I have a rule that only firewall can access to server: -A INPUT -m state ...
2
votes
1answer
253 views

iptables ruleset causes server to stop answering

I'm trying to configure my proxmox server's firewal and redirections. The aim is to block everything, open the necessary ports for basic services to work and, finally, redirect some ports to virtual ...
1
vote
0answers
122 views

Internet sharing disappears when either eth0 or wlan0 gets disconnected

I just got a RasPi B+ and I'm looking to replace the Windows PC that's doing the routing job. What I'm trying to do with the Pi is making it share the connection (wlan0) with another wifi router (via ...
0
votes
1answer
62 views

Does iptables protect from kernel vulnerabilities? [closed]

I read a lot of kernel vulnerabilities which are beyond my understanding. I would like to reduce the risk of an issue related to one. If I block everything other than SSH on a server, will this help ...
0
votes
1answer
229 views

how to make firewall changes permanent via firewall-cmd?

I am trying to open some ports in CentOS 7. I am able to open a port with the following command: firewall-cmd --direct --add-rule ipv4 filter IN_public_allow 0 -m tcp -p tcp --dport 7199 -j ACCEPT ...
1
vote
0answers
120 views

route gateway proxy traffic through different interface with identical upstream gateways

My question is similar to the below with a small caveat not answered by any of these threads: Output traffic on different interfaces based on destination port ...
2
votes
1answer
46 views

(S/D)NAT over NF hooks

Could someone help on explaining the advantage of iptables NAT over the netfilter hooks. Say suppose, instead of using NAT if we create custom kernel module to bind handler with netfilter for PRE/POST ...
2
votes
1answer
26 views

Make a request through vpn interface

I want to be able to make request through a specific network interface, like this: ping -I eth0.1 google.be ping -I eth0.2 google.be This example works on my multihomed OpenWRT router. I now want ...
0
votes
2answers
56 views

rc.local and networking start order

If I add iptables-restore to my /etc/rc.local script, will this be guaranteed to be executed before any networking is started by the OS? The alternative is that there will be a brief period where my ...
3
votes
0answers
109 views

Is iptables able to filter off UNREPLIED connections?

I am a using dd-wrt router and trying to get some per-user metrics, I was wondering about filtering only ESTABLISHED connections or include NEW and RELATED, I have read a lot about this last two, but ...
0
votes
1answer
50 views

iptables INPUT command

On a machine called ubuntu1, this is the iptables command: sudo iptables -A INPUT -p icmp -j DROP on the other computer (xp1) I can not ping the ubuntu1.So this is OK. But On ubuntu1 can ping xp1. ...
0
votes
1answer
369 views

Proxmox shows “Login failed, please try again” when I apply my iptables rules

I've just got a powerful dedicated server, and I'd like to virtualize it. The idea is to install Proxmox VE on the host and then create a VM for each use: one for my website, one for mi Git repo, and ...
1
vote
1answer
121 views

Minimize game server delay with iptables

I have a debian 7 server hosted by Google Cloud running a game server and a rails server. The rails server run on port 80 and the game server on port 8000. I wanna apply a network rule that allow ...
1
vote
1answer
413 views

record contents of packets dropped in iptables

I'm trying to find a way to record the entire contents of packets (possibly with tcpdump) that have been dropped according to rules in iptables. At present, I have a rule to log these packets (with a ...
1
vote
0answers
44 views

Initial iptable rule and knockd operation in vps

Today I launched a vps with Debian 7 x64 and started playing around with it. I installed xampp as well as knock daemon to get my hands dirty. So, all I wanted to do was to actually block all requests ...
1
vote
1answer
33 views

How to configure correctly iptables for run Maples with a blocked internet connection?

I would like to be able to run Maple with a blocked internet connection. For doing so I set my iptables by doing something like this for user joe: sudo iptables -A OUTPUT -m owner --uid-owner joe -j ...
1
vote
0answers
106 views

I Need Find A Mac Address from a client connected to my Teamspeak

I have a dedicated server and from it I am running a teamspeak 3 server. In teamspeak server there is a client who need to be banned. I have banned him from teamspeak but if you change your windows ...