Iptables is a module that provides the Linux operating system functions of firewall, NAT and logging of data traveling over a computer network.

learn more… | top users | synonyms

1
vote
0answers
88 views

Define IPTABLES rule

I am working with a linux based UTM appliance and have some disagreement with the client on the operation. THere is a standard GUI to configure port forwards in the firewall but for some reason he ...
1
vote
1answer
261 views

Adding a custom SSH port to Ubuntu 12.04 LTS through UFW

I am trying to configure a Ubuntu 12.04 based VPS and I have changed my ssh port from 22 to 803 and everything worked fine. After this I've installed UFW and now I can't login using SSH. Before I ...
1
vote
0answers
277 views

iptables load balancing for TLS with request routing on the same connection

I am trying to set up iptables rules for TLS connection. I have three internal IP in my machine and I route requests coming on public IP at port 443 to each of these internal IP in RR. -A PREROUTING ...
0
votes
2answers
196 views

Server can't be accessed

I have a server I rent from OVH and I rebooted it and now I can't connect to it, OVH responded with "The server has started (login is requested on the screen) but inaccessible by the network (not ...
1
vote
1answer
298 views

Disable SSH remote tunneling

I need to restrict SSH tunnel functions. Users should not be allowed to create remote tunnels but only tunnels to localhost. I tried to setup the whole thing in the SSH configuration but I can only ...
1
vote
0answers
208 views

nc connection refused even on loopback

I'm working on an embedded linux system, which appears to be networked correctly and is running ssh (dropbear) and rpcbind. I'm setting up a server application on it, and every single thing I try ...
2
votes
1answer
6k views

How to allow FORWARDing with firewalld on a Fedora 19 router

I've just installed Fedora 19 and I'm using firewalld instead of iptables, but I'm having difficulty interpretting the new terminology. I have 2 NICs. One is specificed ZONE="internal" and the other ...
2
votes
2answers
2k views

How can I port forward an LAN port to a WAN Ip with iptables?

Using iptables on my router (dd-wrt), I'd like to forward requests to the router on port 64738 from the LAN to an IP (192.168.10.14) on the WAN. This is the opposite of the norm (forwarding a request ...
0
votes
1answer
1k views

Prevent device from reaching WAN traffic (MAC address for example) - OpenWRT

I want to forbid a device on my network from accessing the internet. Computers still have to communicate with the device, and vice versa. OpenWRT version: OpenWrt Attitude Adjustment 12.09
1
vote
1answer
997 views

iptables routing marked packets from router to PC and routing them back to router

I'm trying to do deep packet inspection on HTTP packets. The purpose of this is to collect HTTP payload data and then create some proxy/cache-independent reports. Following this, the idea is to ...
0
votes
0answers
2k views

Using iptables to give an LXC container a routable IP

I'm using Docker to manage LXC containers. At the moment Docker configures the underlying LXC container with host-only routing and then uses iptables/DNAT to punch holes into the container, making it ...
1
vote
2answers
1k views

CentOS 6.4 and alternate SSH port not working

I've got a CentOS 6.4 machine and would like to change the default SSH port, and followed these instructions: CentOS Wiki After making those changes (including the "semanage port -a -t ssh_port_t -p ...
0
votes
0answers
191 views

Linux Traffic Control of internet downlink with router as a client

I'd like to shape my internet downlink bandwidth in a bit peculiar way. My linux box at home acts as a router and a torrent client (and other downloads), making my router a router and client inside my ...
0
votes
0answers
2k views

Forwarding RDP connections with iptables

I have a workstation that runs Windows 7 as the host, and Ubuntu Server 12.04 in VMware on a bridged network. Both have their own static public IP address. However, I only have one hostname to work ...
0
votes
1answer
377 views

Iptables output with options unknown

I have been learning and studying up on iptables and port forwarding. There is a sample iptables output I can't decipher. It has the options --dir, --pol, and -m. Although I am familiar with -m it ...
0
votes
1answer
2k views

Fedora's firewalld vs iptables

I am on Fedora 19. Is my understanding correct that as long as firewalld is up and running (and properly configured using firewall-config) the contents of the /etc/sysconfig/iptables has no meaning? ...
2
votes
0answers
342 views

Limit bandwidth on HTTP downloads based on file size

Is there a way to limit lets say in iptables or any proxy solution/software if a user is downloading a filesize that is greater than lets say 20MB it will limit his entire download at 2KB/s? ...
0
votes
1answer
336 views

Block brute-force on server with http auth behind cloudflare proxies

My server is behind Cloudflare proxies. I have configured simple http authentication to restrict access to some server resources. I'm trying to block brute-force attacks on http auth with fail2ban. ...
3
votes
2answers
527 views

Force certain applications to use VPN

For a few days now, I've been trying to force only certain applications to use a VPN. I've thus far found it pretty simple to either force all applications to use it, or no applications to use it. ...
4
votes
2answers
5k views

Ubuntu 11.04 server iptables port forwarding

I'm pretty new to iptables. My server has two Ethernet cards (eth0, eth1) and an ADSL router that is in bridge mode connected to the eth0 which created ppp0 when dialed. I'm trying to forward ...
1
vote
1answer
565 views

Internet access to host behind firewall using ssh tunnel

My goal is to give host behind firewall access to the internet. Below you can find brief description of network [internet] <-> [proxy] <-> [A] <-> (firewall) <-> [B] [A] - ...
1
vote
2answers
1k views

Iptables configuration to allow Steam Client

I recently got and setup a small linux (Debian) router box. I'm adding it to an existing network to create a small subnet with specific properties, namely internet content filtering. I'm highjacking ...
1
vote
2answers
135 views

DNS set correctly but website unreachable

I have the (sub)domain elo.bernardinuscollege.nl, which has a DNS A record that points to 54.225.118.87, which is correct (checked it with telnet, which indeed returns the right IP). For some reason ...
0
votes
1answer
1k views

How to do port forwarding/redirecting on Debian?

I have two questions. Question 1: My debian machine has interface eth3 with ip 192.168.57.28. If someone tries to connect to 192.168.57.28:1234 how do I redirect the request to another machine: ...
0
votes
1answer
709 views

Unable to ping my VirtualBox VM

I've installed a VirtualBox VM from http://virtualboximages.com/CentOS+6.4+x86_64+LAMP+Server+VirualBox+VDI+Virtual+Computer. My VM has access to internet, and I can ping the host. I've set a static ...
1
vote
1answer
491 views

Multiple IP addresses through the same interface and iptables

System Admin is not my strong point. My situation is we have 1 website that has 4 domains. The website itself serves different templates/content depending on which domain is used, simulating 4 ...
2
votes
1answer
4k views

Redirect incoming https to local ip with iptables

I have a router with 1 network interface (eth0, public ip) and an alias for eth0:0, local ip 192.168.1.1. I want to redirect all incoming https (443) traffic to another server. I tried it with ...
3
votes
2answers
3k views

what does “-m tcp” mean in this iptables rule?

Firewall configuration written by system-config-firewall -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
1
vote
1answer
280 views

Can't reach web server from local virtual network

I have installed a couple of virtual machines. Some uder Windows, some under Fedora Linux. On one of the Fedora machined I've installed Apache web server. I have setup server name in httpd.conf to ...
0
votes
1answer
1k views

iptables MASQUERADE and SNAT together

Good people, I have a network having the following setup eth0 10.216.11.41 internet facing eth1 192.168.0.4 internal network interacting with other machines within the internal network. Id like ...
0
votes
1answer
112 views

IPTABLES to block sites on browser

I am trying to block a specific IP address from being accessed using the browser on my system. I added a simple rule as below iptables -A OUTPUT -d <IP> -j DROP The site gets blocked in the ...
0
votes
0answers
353 views

iptables not working on DDWRT firewall

I have write a firewall rules for DDWRT router but I didn't work. What I needed is, I would like to set all my wireless user, once it reach daily quota which is 200mb it will disconnected from the ...
0
votes
0answers
3k views

Can't connect to mysql by telnet 127.0.0.1

I can't telnet MySQL on my localhost. MySQL is up and running and works fine with Apache-SSL/PHP/MySQL server but I can't connect by telnet: telnet 127.0.0.1 3306 Trying 127.0.0.1... telnet: Unable ...
1
vote
1answer
769 views

OpenVPN + Squid or another way of blocking advertisements/websites?

I have a personal VPN that I use on my tablet for public wifi protection. Adblock+ is limited on android in that you need to set up a proxy for it to work, and this isn't ideal. Before I started ...
0
votes
0answers
36 views

Modify rule when service crashes

I have a iptables rule in PREROUTING that redirects all incoming to a specific port, where a service consumes the data. Is there a dynamic way to determine if the service has crashed and remove the ...
0
votes
1answer
1k views

Forward to Internal IP and Port From a Single IP Address on DDWRT Router

I'm trying to follow this guide and I have a simple request that I haven't been able to solve. I'd like to only accept requests from a specific IP address to a host within my internal network at home. ...
0
votes
2answers
377 views

DDWRT Port Forwarding Request from Dynamic IP

I'm running a DDWRT router with a NAS behind it. The NAS runs a service called Cloud Station. I'd like to restrict access to Cloud Station to a handful of hosts (family members). Each family member ...
1
vote
0answers
154 views

NAT routing command in windows

Is there any specific command in windows which do the following task: I want to modify the source IP address in the packet whose Destination IP is not in the private LAN, i.e., I have a virtual ...
1
vote
1answer
352 views

ICMP firewall policy for standard ubuntu desktop

For a standard desktop computer running Ubuntu 12.04 behind a NAT router, what ICMP packets should one accept in the firewall, say iptables? It seems there is often conflicting advice; some say block ...
1
vote
1answer
2k views

OpenWrt: how to give wlan clients @ 10.x Internet access via gateway @ 192.168.1.254

I want to isolate guests connecting to my Wi-Fi to the 10.0.0.x subnet, while giving them Internet access. The OpenWrt router is at 192.168.1.48 ("wifi" interface has 10.0.0.1) and my gateway is at ...
2
votes
1answer
5k views

how to open ports for localhost on linux?

I've been reading for the past hour about opening ports on Ubuntu 12.04 and I can't seem to get anything to work. I'm running a program with an RPC server accepting local connections on localhost ...
0
votes
1answer
1k views

Blocking all sites/IP address but Google.se with iptables

Im trying to block all IPs but Google.se. It doesnt work (Site does not display) Here is what I wrote: #/bin/sh echo "Flushing IPTables..." sleep 1 iptables -F iptables -X iptables -t nat -F ...
0
votes
1answer
317 views

iptables: how to allow genuine internal traffic whilst blocking spoofed/bogus packets?

So I've read that a common attack is spoofing packets from internal SRC IP addresses, such as 192.168.0.0/16. How can I defend against this with iptables, yet at the same time allow traffic from the ...
1
vote
0answers
346 views

I need some help proof reading my IPtables rules, my rules seem to work but I cannot be sure

Like the title says, I need some help proof reading my iptable rules, my rules seem to work but I cannot be sure. My set up is as follows: ISP ---> cable modem ---> Ethernet switch ---> ...
1
vote
1answer
423 views

iptables, redirect from ip address to loopback

I have an Apache web server listening in 127.0.0.1:63280 eth0 has IP: 172.200.200.200.1, and try to connect from workstation IP 172.200.200.200 iptables -t nat -A PREROUTING -s 172.200.200.200.1 -p ...
2
votes
0answers
321 views

Centos iptables blocks after reboot

I have a Centos5 installation with kvm on my server. I am using nat portforwarding to ssh my virtual machines. I have several iptables rules and saved then in /etc/sysconfig/iptables. After reboot, I ...
0
votes
1answer
634 views

Manually Editing iptables

I'm using CentOS. What I'm wondering is, what happens if I manually edit /etc/sysconfig/iptables and save it? Is that the definitive source? When I type iptables -L I get something that doesn't match ...
1
vote
1answer
168 views

Valid Type Of Service Values

I need to know what are valid values for TOS field in iptables. I mean when I try to add a rule with ip rule add what can I give as tos value I could not find any resource about tos value. I know ...
1
vote
1answer
183 views

How iptables behaves on timezone change?

I have doubt how iptables keep changing the info in iptables when timezone is change. I am using iptables s v 1.4.8 I have blocked one IP with following details # date Thu Jun 6 12:46:42 IST ...
1
vote
0answers
350 views

NAT router sends RST to a server where a NAT'ed client is connected to

As I tried to remove some Ethernet wires in my home network, I took an older notebook with Linux and tried to use it as some kind of Ethernet-2-WiFi-NAT-router (Wi-Fi card can't act as bridge, so I ...