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
1answer
292 views

excluding port from VPN client

I use hidemyass which is a vpn service. I use it for privacy reasons. The main purpose of the VPN is for my web browsing. How can I exclude certain ports from using the VPN connection? For example: ...
1
vote
2answers
839 views

Why nic with incorrect subnet mask can still ping the gate way?

At first, my network config was like this: $ ip a 2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 3c:97:0e:bd:b1:68 brd ff:ff:ff:ff:ff:ff ...
-1
votes
1answer
530 views

Iptables: allow wget

for some reason the following rules block wget. iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp ...
1
vote
1answer
343 views

Iptables limit user access time and mac

I am trying to create an iptable chain to kick my daughter off her ipad during the night. With the mac only filter I can block access but when I add time it no longer works. Does anyone see an issue ...
0
votes
3answers
415 views

Show a default page after connecting to WIFI LAN

I have the following setup at home: |--------------------| INTERNET ---- | GATEWAY COMPUTER | ----- WIRELESS ROUTER )))))) CLIENT 10.10.0.2 ...
0
votes
2answers
247 views

How to set iptables?

I want to allow traffic only for httpd(nginx), port 2710 and ssh. I've tried the following, but it didn't work and apparently all httpd, traffic was blocked and I couldn't access ssh as well. There ...
0
votes
1answer
517 views

Redirect/Block outgoing HTTP traffic for a specific URL on Mac

I want to know if it's possible to redirect or block HTTP traffic with a string like this command on linux : iptables -A OUTPUT -p tcp -m string --string "STRING" -j REJECT
1
vote
1answer
249 views

On Linux, can I forward wlan0 to eth0, and wlan1 to eth1?

I have the following simple situation: two internet connections via two distinct ethernet NICs, eth0 and eth1, and two APs (I use hostapd, of course) on two distinct wireless cards, wlan0 and wlan1. ...
1
vote
1answer
936 views

iptables NAT doesn't preserve remote IP

I have the iptables rules below forwarding incoming ssh traffic on port 2222 to a virtual machine running in a vmware "vmnet" network on the same host. 192.168.1.1 192.168.1.40 +---------+ ...
1
vote
1answer
2k views

Sharing OpenVPN to specified IP-range on the local LAN

Is it possible and how to share OpenVPN (currently Anonine) -connection to specified IP-addresses on the local LAN? Local LAN consist windows- and linux machines and Android devices. Current setup, ...
0
votes
1answer
146 views

Same IP on two NICs?

This is similar to this question. However I'm looking for an answer from a perspective of worst case scenario, and risks involved. I'm not interested in LACP or cnahhel bonding. I have a computer ...
0
votes
1answer
585 views

DD-WRT port forwarding doesn't work for internal subnet

I've a router with dd-wrt firmware. I've setup 2nd IP address via Iptables commands and have portforwarded one port. It works fine. However it doesn't work internally. Trying to go internally for ...
0
votes
1answer
183 views

iptables routing traffic from1 pc to another and then out to specific internet IP

I have a server (10.10.10.2) that can't access the internet and has an APP on it that needs to access a service on public IP w.x.y.z. Another server (10.10.10.3) that does have internet access can ...
0
votes
0answers
427 views

Dropping Packets with Openvswitch Openflowcontrol

I am trying to setup some Flows with ovs-ofctl to block all unwanted incoming packets for a VM. The commands I use are: ovs-ofctl add-flow xenbr0 "priority=65000, table=0, tcp, dl_src=*, nw_src=*, ...
0
votes
1answer
504 views

How to set a port forward in Ubuntu's iptables?

This quote should explain me how to do this, but I don't get it... Next, I had added following rules to forward all http requests (coming to port 80) to the Squid server port 3128 : iptables ...
0
votes
0answers
234 views

How how can I set up iptables for a Squid proxy?

I rented space on a server with a static IP address, and I would like to set up a transparent proxy on this server. After configuring the Squid for testing purposes with the listener http_access ...
3
votes
2answers
5k views

iptables gives me the error “can't initialize iptables NAT”

I am trying to use iptables and it is giving me the following error root@vikkyhacks:~# iptables -t NAT -L iptables v1.4.18: can't initialize iptables table `NAT': Table does not exist (do you need to ...
2
votes
1answer
184 views

Traffic not being forwarded through NAT

I have a router which provides internet access using NAT, and a client Linux box (A) which is connected to this router on eth0. This Linux box also has a wlan interface, wlan0; what I would like is ...
0
votes
1answer
2k views

Route LAN traffic through eth0, not tun0, on my VPN access point

How can I make my Access Point send traffic to 192.168.1.0 through eth0 and all other traffic through tun0? I have set up a Raspberry Pi VPN access point. It sits on the same subnet as all my ...
0
votes
1answer
57 views

redirect data form tunnel to another network

I have Linux computer with eth0(192.168.1.20/24) and tun0(10.8.0.6/24) interface. I am sending data through tunnel to Linux computer in the specific port and want to redirect all data to another ...
0
votes
1answer
393 views

Iptables filtering and NAT with secondary IP address

I have two IP addresses on my physical eth interface. Lets say 192.168.10.7 (eth0:0) and 192.168.0.7 (eth0). So it works. But I use application, working on the only one of this addresses on port ...
2
votes
1answer
6k views

Using iptables to redirect ip address

I have the requirement on a Linux system where the Linux device is using RSYNC to sync data to another Linux machine. This is working fine at the moment, however I need to move one of the machines to ...
1
vote
1answer
357 views

With iptables only allow certain outbound ports

Okay, I'm running a router with shibby tomato (linux based) v1.28-115 and have a bridge network setup (br1) that consists of a guest wifi. I want to only allow access to specific outbound ports... ...
0
votes
3answers
2k views

Use iptables on gateway for port forwarding

I have a Linux machine in my local network that I use as a gateway, so all of my network traffic passes it (the machine has only one network interface which I use for incoming and outgoing traffic). I ...
0
votes
1answer
192 views

Will using iptables DROP target cause TCP CLOSE_WAIT that never completes?

I have some simple rules to block certain IP blocks used frequently by hackers/spammers, e.g.: iptables -A INPUT -s 173.208.250.0/24 -j DROP But, I noticed that apache hangs after a couple of days ...
3
votes
1answer
4k views

How do I forward traffic between Tun device and eth0?

In summary, I would like to have Tun device traffic forwarded back and forth through another network interface that has internet connection. While I can see the traffic going out to internet ...
0
votes
1answer
561 views

iptables stupid error (iptables -A INPUT -j ACCEPT)

[root@router ~]# iptables -A INPUT -j ACCEPT iptables: No chain/target/match by that name. How is that possible? I recompiled the kernel (3.11.8) and updated iptables to 1.4.16. The strage thing is ...
0
votes
0answers
160 views

iptables messing up Tomcat?

I encountered the following problem(s) using Tomcat 7 with iptables on. 1) Namely, there's this Tomcat 7 instance that I run on server-1 (directly exposed), and this Tomcat instance hosts a REST ...
0
votes
0answers
179 views

centos 6.4 nat virtual machines not able to connect to the internet

I have two virtual machines running on virtual box. The master has one interface(eth0) bridged to the host nic(eth0) and another one connected to the internal network(eth1). This acts as a gateway to ...
1
vote
1answer
597 views

Chromecast, Unblock-Us and Edimax BR-6478AC router

It seems that Google has hard coded the Google DNS into the Chromecast, thus making it pretty much useless for anyone outside the U.S. who wants to use it for Netflix and Hulu. I have the above ...
-2
votes
1answer
6k views

How do I block all ports except 22 and 80 in Centos6.2 64bit

How do I block all ports except 22 and 80 in Centos6.2 64bit. thanks all.
0
votes
1answer
1k views

INPUT or PREROUTING, which is first checked?

About iptables. I saw contradictory explanations. This site and most article say PREROUTING chain is checked before INPUT chain. But another tutorial(page 4-6) says INPUT is before PREROUTING. Whom ...
-5
votes
2answers
290 views

Is there a way to pause/resume particular TCP connection?

I'm playing online game that matches me against random players. I found out that when I unplug my Ethernet cable, I have a minute to decide do I want this match to count. If things go wrong, I just ...
2
votes
1answer
458 views

CONNMARK on rewritten packets

I have a host, on which I rewrite saddr and daddr of IP packets coming to it, this is done by the program, employing libnetfilter_queue. Basically it acts like proxy. For example, the packet comes ...
0
votes
1answer
1k views

Centos 6 server does not open ports

So after some battling and struggling with the firewall, i see that I may be doing something or the firewall isnt responding correctly there is has a port filter that is blocking certain ports. Okay, ...
0
votes
1answer
2k views

debian gateway using iptables

I am having problems setting up a debian gateway server. My goal: Having eth1 the WAN interface. Having eth0 the LAN interface. Allow both ports 22 (SSH) and 80 (HTTP) accessed from the outside ...
0
votes
1answer
68 views

List rules using iptables in a customized way

How to list the iptables rules in a customized way? Like: target protocol portnumber src dest the order could be changed but I dont want the name of protocols, just number (like 80 instead of http) ...
0
votes
1answer
745 views

Can't ping through default gateway

I have the following configuration: Routing table on M3 is: Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.2.1 0.0.0.0 UG ...
0
votes
1answer
623 views

Install multiport module on iptables

I'am trying to install "fail2ban" on Cubidebian, a Debian port for Cubieboard (A raspberry like board). The following rule failed due to "-m multiport --dports ssh" options (It works, when i run ...
0
votes
1answer
524 views

Understanding how dnat works in iptables

I'm running 3 virtual machines with Fedora 19. The machine B is set up with two networks adapters and provides que channel between machine A and machine C. The machine A IP is set to 192.168.1.3 and ...
2
votes
2answers
7k views

Iptables redirect to localhost?

Suppose I have a network with a server routing all connections from inside the network to the Internet. How can I set up iptables so that instead of routing incoming connections to the Internet, it ...
0
votes
1answer
106 views

NM+iptables: How to forward port to shared wired connection?

I connect to my wireless network through NetworkManager. In addition I have another computer connected to the first one through ethernet. I'm using NetworkManager to share the wireless connection of ...
0
votes
1answer
300 views

redirecting traffic from a network interface to dansguardian

I have setup a Squid + Dansguardian parental control at home. I connected a WIFI router to the Ubuntu machine and share that network for my kids' mobile devices. The parental control works fine on the ...
0
votes
1answer
339 views

Redirect PROXY traffic to test box using IPTABLES

Marked this as answered. I'm going to pass on trying to get this to work. It was only for testing. I'm currently using a proxy server (squid) that's listening on port 8080. Users' browsers are ...
1
vote
1answer
145 views

Drop IP fragments of a certain protocol

When conntrack is active, the iptables stack never sees a fragmented IP packet, only the reassembled one (source), so the -f test never matches. If I want to block any fragment I could set ...
0
votes
1answer
184 views

iptables FORWARD rule

I'm running 3 virtual machines with Fedora 19. The machine B is set up with two networks adapters and provides que channel between machine A and machine C. The machine A IP is set to 192.168.1.1 and ...
0
votes
3answers
640 views

Can't ping after ip change

I'm running 3 virtual machines with Fedora 19. The machine B is set up with two networks adapters and provides que channel between machine A and machine C. The machine A IP is set to 192.168.1.1 and ...
0
votes
3answers
119 views

iptables rule to block traffic not specified in all other rules

Is there a way to add a rule in iptable to block traffic not specified/covered in all other rules ? I know that we can use ! to block specific ports and ip addresses but there are just too many rules ...
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 ...