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
3answers
138 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
111 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
349 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
0
votes
1answer
139 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
281 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
696 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
83 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
308 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
111 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
203 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
0answers
92 views

how to proxy to a VPN connected server with local services running?

I'm having trouble accessing services that are running on my Linux Box from outside the local network. The setup is not as simple as most tutorials describe so I'm a bit stuck. My Linux Box (running ...
0
votes
1answer
319 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
115 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 ...
1
vote
2answers
2k views

iptables gives me and 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 ...
1
vote
1answer
91 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
778 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
43 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
210 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 ...
0
votes
1answer
832 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
137 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
772 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
89 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
2k 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
269 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
95 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
90 views

Session limit for OpenSSH server on Ubuntu Desktop 7.10

I need restrict session limit on my OpneSSH server only for one session (one connection). I use Ubuntu Desktop 7.10. Of course Version is old, but I need it for experimental purposes. I tried modify ...
0
votes
0answers
137 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
341 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 ...
-3
votes
1answer
3k 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
0answers
194 views

Req' Iptables Guru: rule to forward to HTTP proxy

I have a RPi with two interfaces, wlan0 and eth0. Through eth0 I have connected a set-top-box (STB): the network for eth0 is 192.168.2.0/24. My experiment is to use a transparent HTTP proxy ...
0
votes
1answer
310 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
102 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 ...
0
votes
0answers
31 views

Allow INPUT port for specific UID

I want to restrict an open UDP port from the INPUT chain to a specific UID, so that only if a process belongs to the UID, it receives packets on that port, otherwise they are rejected. For some ...
0
votes
0answers
52 views

Web proxy on LAN - iptables and Win Firewall

My LAN is simple: Router: C.C.1.1 Win 7 laptop: C.C.1.2 RPi: C.C.1.3 "C.C" = 192.168... The Win 7 laptop is connected via its WiFi interface. I have connected another machine (let's call this ...
2
votes
1answer
252 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
592 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
736 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
27 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
297 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
0answers
224 views

SCP over NAT stalls at 2112KB

I have two systems (A and B) on different subnets, with one dual-homed box (C) that can see both. I use iptables DNAT on C to port-forward SSH to B, so that A can run ssh -p 12345 hostC to connect to ...
0
votes
1answer
261 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
232 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 ...
1
vote
1answer
2k 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
87 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
154 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
276 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
70 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
98 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
263 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
111 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 ...