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

0
votes
0answers
317 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
2k 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 ...
0
votes
0answers
34 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 ...
1
vote
1answer
665 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
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. ...
1
vote
0answers
149 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
295 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 ...
0
votes
2answers
343 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 ...
2
votes
1answer
4k 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
965 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 ...
2
votes
1answer
3k views

How to use NAT iptables rules for hostapd

My PC is equipped with two net interfaces - wlan0 and eth0. I want to use WiFi port as access point on wlan0. So i use hostapd facility and it works properly in routing mode in local network. Users ...
0
votes
1answer
296 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 ...
2
votes
1answer
1k views

Nginx works on my linux machine but is not accessible from other computers in my local network

In my LAN network I have a server with Scientific Linux (RedHat or Fedora based distro), I've done yum install nginx but the welcome page is not accessible from other computers in my network. When I ...
1
vote
0answers
305 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 ---> ...
0
votes
1answer
553 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
150 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
0answers
287 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 ...
1
vote
0answers
93 views

Lubuntu UFW does not respond

I have been using ubuntu for a long time. Nowadays, I wanted explore lubuntu. However, I cannot configure ufw. Actually I can but it does not respond. Basically, I cannot get the result of "ufw ...
1
vote
1answer
362 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 ...
0
votes
1answer
773 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
316 views

How can I detect long-lived connections and mark them for shaping

I would like to detect TCP connections which have been open for more than one minute (or for greater than N bytes, or M packets), so I can classify them as bulk traffic ("downloads") and de-prioritise ...
1
vote
1answer
158 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
160 views

Change UDP port with iptables for VPN clients

What I want to do is say that for all UDP connections on interface ppp0 that have a destination port of 53, change that destination port to 1053. I am attempting to change the destination port of UDP ...
0
votes
1answer
1k views

Iptables drop forward packets to specific host

I am having trouble isolating a specific host from others on my lan. What I am trying to do is only allow communication between 192.168.0.2. and 192.168.0.8 as well as not allow any other host to ...
11
votes
2answers
10k views

No idea what is listening on port 80 in OS X

I'm on OSX Mountain Lion 10.8.3, and I've freshly rebooted my Mac. I want to start a service (like Apache on port 80), but there is already something going on with port 80: telnet localhost 80 ...
0
votes
1answer
126 views

Can iptables be used to convert a single-homed host into a NAT server?

I have an Internet-enabled machine, HostA, with one NIC. I have another machine, HostB, with one NIC that is not Internet-enabled. I would like HostB to be able to share HostA's Internet-connection. ...
0
votes
1answer
258 views

How do I drop the entire INPUT chain from iptables?

On Linux, I've been building a malicious IP list. I assume the DDOS is now gone. How do I drop the entire INPUT chain from iptables, without affecting the FORWARD or OUTPUT chains?
0
votes
1answer
94 views

Linux gateway / DNAT: restrict to certain interfaces

I have various machines with a number of network interfaces: eth0: a local LAN eth1: sometimes used for the connection to the Internet gateway ppp0: Modem uplink as an alternative to eth1 tun0: ...
2
votes
1answer
230 views

Allow shell access for key holders OR password login for whitelisted IP addresses

As a first line of defense against brute-force attacks, I've restricted SSH login attempts with TCP wrappers (denying access by default, and maintaining an IP whitelist in /etc/hosts.allow). However, ...
1
vote
1answer
1k views

Limit UDP outbound traffic to loopback (localhost) instead of eth0

Atm i'm testing it on Ubuntu Server at VMware Workstation + Windows 7 local host with bridged connection. Later this has to go to live server. I have VLC streaming video file on Ubuntu with cvlc ...
0
votes
2answers
34 views

Problems in creating rules in iptable

Hello to all :) I need a little help with creating a rules. Im starting to learn iptables and firewalls but I have some questions. I need to allow HTTP communication only from PcA to PcB./ My code is: ...
1
vote
2answers
775 views

How do I route a port range in a linux host to a guest VM?

I am trying to redirect a certain port range in a linux host to one of its guest VMs. I would like for this redirection to apply to all the host's interfaces, including localhost. I was able to do: ...
0
votes
1answer
227 views

Updating iptables via ddclient

TL;DR Is there anything I can do to change iptables from ddclient (with user ddclient)? The story behind I have a computer that uses dyndns to be addressable from outside. Whenever the provider ...
1
vote
1answer
3k views

iptables rule for loopback interface lo

I want to test some network performance, where I need to use a tcp client to connect to a tcp server program on the same host, so I used localhost(127.0.0.1) however, when the TCP SYN is sent, it get ...
1
vote
2answers
917 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
1answer
1k views

Can't connect to SSH over VPN when using 3G only

I'm having a bit of a strange problem that I'm not sure how to debug/fix. I have a Raspberry Pi connected to a Windows VPN via either a wired interface or 3G dongle. With the wired interface I can ...
0
votes
1answer
171 views

How to drop IP packets received on the default route interface when no other than default route is found?

I am setting up a router based on a linux kernel. As expected, ipv4 packets received on the interface used by default route are sent back to the same interface in case no other route is found. Is ...
0
votes
0answers
880 views

How does iptables masquerading allow to access a different local subnet?

My Linksys router (IP 192.168.1.1 inside a /24 subnet) is connected to my ADSL modem (IP 10.0.0.138 inside a /24 subnet) to establish an internet connection via PPPoE. To be able to access the modem's ...
1
vote
3answers
767 views

linux routing outbound port 80 traffic via ssh tunnel, iptables, or a simple route

I have two hosts, A and B. Host A hosts services on port 8080 and has outbound internet firewall rules allowing port 80 and 443 access to Host C. Host B is on the same subnet as Host A. Host B is ...
0
votes
1answer
1k views

using iptables to prevent RST related to a specific port

I have a program which uses libpcap to capture incoming TCP SYN packets, these SYN packets are destined for a specific port. But I have no tcp listening socket for that port, so in practice, the OS ...
0
votes
3answers
115 views

iptables rules are not in action

I have a iptable rule file, on the INPUT chain I have -A INPUT -i em1 -p tcp -m tcp --dport 54000 -j ACCEPT -A INPUT -i em1 -p tcp -m tcp --dport 30000 -j ACCEPT -A INPUT -i em1 -p udp -m udp --dport ...
1
vote
0answers
390 views

Advanced QoS on prioritized first packages set by ISP

I have the following problem my ISP (Fibertel from Argentina) accelerates, 'enhances' the first 6.8 megabytes of downstream transfer and it's seems the first 1.8 megabytes of upstream transfer. This ...
0
votes
1answer
111 views

allow redirects with iptables

with the following rules, php can't make a redirect to another file. it's freezes at the point when it gets toheader("Content-type: video/x-flv"); header("Location:" . $VIDEO); or ...
1
vote
2answers
1k views

IPtables Rules to Block IP Range

I've applied the following rules from a text file called "iptables.save" to iptables. But to my dismay, I found that the ip address 107.22.26.176 is still able to access my server via TCP. What did ...
0
votes
1answer
617 views

How to allow access to only specific IPs with Parallels VZ built-in firewall?

How can I use Parallels Virtuozzo's built-in firewall utility (called psa-firewall under the hood apparently actually psa-firewall seems to be a seperate Plesk interface - either way, it's basically a ...
0
votes
1answer
560 views

How can I add the port to iptables rules on centos?

I want to open the port 8040 on my centos, but I keep getting connection refused. This is what I have done: iptables -I INPUT -m state --state NEW -p tcp --dport 8040 -j ACCEPT iptables -I INPUT -m ...
0
votes
2answers
320 views

Iptables: Allow Internal LAN to access INTERNET

I have an internal network behind my router on eth0, and I have my router connected to the internet thorugh wlan0. I can't access the internet from inside the lan, how can I fix this? wlan0: ...
-1
votes
1answer
139 views

Configure IPTables [duplicate]

We have RHEL 5.0 squid proxy in our office. Our LAN is 172.20.12.0 /24 n/w. Proxy ip is 172.20.12.4 /24 . I want to share Internet through proxy. Most importantly: Suppose I have flushed the ...
-1
votes
1answer
645 views

LInux squid proxy

We have RHEL 5.0 squid proxy in our office. Our LAN is 172.20.12.0 /24 n/w. proxy ip is 172.20.12.4 /24 . I want to share internet through proxy. Most importantly: I want to give full access to ...
2
votes
1answer
905 views

iptables status enabled after restart even after disabling

I am disabling iptables on Oracle Linux 6 with these commands. setenforce 0 service iptables stop service ip6tables stop chkconfig—level 123456 iptables off chkconfig—level 123456 ip6tables off ...