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

2
votes
1answer
11 views

How to apply ipfw rules to domains that resolves to multiple IPs?

Suppose I wanted to use ipfw to throttle uploads to youtube. The uploads are made to upload.youtube.com but this domain resolves into multiple different IPs (which also appear to change over time). ...
0
votes
0answers
15 views

not all packets forwarded by pptp VPN server

I have the following setup: +------+ +---------+ ppp0---------+ |router| | A +-----+---+-----+ B | | R | ...
-1
votes
1answer
16 views

Route traffic to a destination to another destination using iptables

How to route traffic to a destination to another destination and receive response using iptables I have two vps on cloud. Lets say VPS-A and VPS-B. If a request to 8.8.8.8 generated from VPN-A, I ...
0
votes
0answers
8 views

Forward traffic from specific ip addresses to another port iptables

I can't figure out the syntax to forward TCP traffic from specific ip addresses to another port using ip tables. Lets say I want any TCP traffic from 1.2.3.4 to port 80 to be forwarded to port 81. ...
1
vote
0answers
10 views

Site to Site VPN - Openswan and CISCO A2A

Below is the diagram that the VPN connection between Openswan server and CISCO A2A. client A and B are remote hosts with static ips. client X and Y are behind the Cisco firewall. I can see ...
0
votes
1answer
22 views

How to permanently disable firewall in Red Hat Linux

I have followed the below steps to disable the firewall in Linux. After reboot, again firewall is enabled. How to disable firewall permanently? Login as the root user. Next enter the following three ...
0
votes
2answers
37 views

Iptables, allow common ports, block the rest

I want to allow people to connect to ports 22, 80, and 443. Also I want to be able to do DNS lookups from my server. Here's what I'm trying: iptables -A INPUT -m tcp -p tcp --dport 1 -j ACCEPT ...
0
votes
0answers
8 views

Block all outgoing ports from iptables.

I have a windows xp machine running specific application which can be access by single port (27500). there is nothing else i want to access on this machine. If i block all outgoing ports from this ...
0
votes
1answer
18 views

iptables does not seem to be applying SNAT to packets sent on a raw socket

I'm writing packets from a user space program to my wireless interface wlan0. I've set up a SNAT rule with iptables as follows iptables -t nat -A POSTROUTING -o wlan0 -j SNAT --to 192.168.1.3 And ...
1
vote
1answer
15 views

Open ports in Ubuntu 13.10 server

Im setting up a realtime gameserver fps-game, and then i need to configure ports. Just to mention, i will setup multiple servers for this game on the same ip address, which means i must open multiple ...
0
votes
0answers
37 views

How to redirect all data through a proxy on Tomato?

My proxy is Squid as an external machine. My router is a WRT54GL with tomato. On the router, I wrote this for the firewall script. It nicely connects to the proxy, but when try to visit any page it ...
0
votes
0answers
12 views

How to IP redirect all requests to public ip back to router

Using OpenWrt Backfire 10.03.1 on Linksys WRT54GL. Till today my ISP's modem used to loopback all traffic with self-destination IP back to itself. (for example if my WAN IP is 8.8.8.8 and I perform ...
0
votes
1answer
38 views

Restricting access to iOS apps based on time of day

I'm looking to set up something on my iPhone and iPad that works like SelfControl on my Mac. I get distracted by Facebook, and would like to restrict my access to it except during certain times of ...
1
vote
1answer
53 views

OpenWRT Firewarll INPUT Chain allowing everything?

I haven't done anything to my the default firewall rules except open a port for ssh from the wan and add the rules for OpenVPN as defined in this tutorial: ...
0
votes
0answers
39 views

Intermittent disconnections when using OpenVPN over SSH tunnel; possible iptables issue?

I've recently set up a Debian Wheezy server with OpenVPN to help out some friends in areas where internet censorship is a problem (including the blocking of VPN traffic in general). To overcome this, ...
0
votes
1answer
27 views

Port Forwarding with the real IP-address

How to implement port forwarding, so that would be displayed on the host real IP and non-IP machine, as it comes with SNAT DNET with IPTABLES The scheme is about the The machine-HETE with IP ...
0
votes
1answer
18 views

CentOS - ipTables

I have some questions about ipTables. Is it possible to open all ports between 2000 and 6000 and then have 2245, 5435,5434 closed? Is it possible to open some ports from a ip address? Eg. The only ...
0
votes
1answer
191 views

CentOS 7.x iptables

I have manually edited the /etc/sysconfig/iptables file in my CentOs 7.x installation , I have two entries and two processes running at the respective ports. I am able to telnet/access port 2181 but ...
0
votes
0answers
21 views

Why won't my proxy server connect to the internet?

I'm setting up a dedicated machine to run a transparent proxy server for my network, but for unknown reasons, clients can connect to the machine, but the internet isn't working. There seems to be a ...
0
votes
1answer
38 views

Need help converting some linux commands to OSX

I want to convert some linux commands into OSX. (Mavericks 10.9.4) root@bt:/# /etc/init.d/apache2 start (will "sudo apachectl start" do the same?) root@bt:/# echo “some Site Goes Here!” > ...
0
votes
1answer
62 views

squid proxy slow response

We are using the squid proxy in our setup and implemented as transparent proxy with user authentication. Before couple of days, while we are trying to setup the iptables the squid started performing ...
0
votes
0answers
29 views

How to correctly configure iptables on a laptop?

I have run these commands (tried switching the order too) because I want to set up a firewall on my laptop so that nobody can connect to it (except of course in response to a connection I've made): ...
0
votes
1answer
59 views

Why doesn't SpeedTest.net Upload work in Windows when using a Debian-router?

There is a FTTx connection. I connect ISP cable to the WindowsXP pc, setup PPPoE. SpeedTest.net shows normal Upload / Download. Now I connect ISP cable to router with Debian 7.5 installed, set up ...
0
votes
0answers
95 views

udp client sending ICMP “port unreachable” when receiveing messages from the server

(Note: I moved this question from StackOverflow, because it's to be considered off-topic there, better fits here, and still unsolved) I have a udp client using luasocket, basically doing this (with a ...
1
vote
1answer
33 views

Should my server ever need to directly communicate with the NAT gateway?

What I mean by ``directly communicate'' Does it ever need to receive packets with the gateway's IP address as the source IP address, or send packets with the gateway's IP address as the destination ...
0
votes
0answers
9 views

Redirect external request thru VPN

I'm using Centos 5.4 and I'm trying to use the XMPP outside the company. But, the XMPP only works with the VPN. VPN connects and the XMPP become 10.0.2.49:5222 I tried to use iptables using this: ...
0
votes
0answers
33 views

iptables configuration on Windows Azure (CentOS 6.5) for endpoint load-balanced set

I created 2 VMs (CentOS6.5) on Windows Azure for Postgresql database and HA cluster, everything works fine except when I set iptables service on, the endpoint load-balanced set is down. for security ...
1
vote
3answers
26 views

Firewall init script

On Debian, what is the best way to start an iptables firewall script : /etc/init.d/firewall_script.sh in /etc/network/interfaces, add post-up /etc/network/if-up.d/firewall_script.sh Do you check ...
0
votes
0answers
27 views

Openvpn iroute traffic to internal network

I have a simple scenario like follows : 3 openvpn clients and an openvpn server , openvpn clients are (C1 , C2 and C3 ) openvpn server is (S1) behind the 3 clients ( C1 a network of 192.168.1.0/24) ...
-1
votes
2answers
47 views

mirroring traffic with iptables doesn't work

i want to mirror specific traffic to ip 192.168.200.1 i use this solution : Mirror Port via iptables but when i enter following command, error occurs: iptables –I PREROUTING -t mangle -j ROUTE --gw ...
2
votes
1answer
40 views

IPSet with IP6Tables ERROR

Can someone please solve my headache and tell me how to fix this? [root@www ~]# ip6tables -I INPUT -m set --match-set blacklist6 src -J DROP ip6tables v1.4.7: Couldn't load match ...
0
votes
0answers
23 views

rails ssl setup on Amazon EC2

Environment Amazon EC2 CentOS Rails 4.0.4 SSL certificates installed Chef My Rails config In my environment .rb (staging.rb and production.rb) I added this config.force_ssl = true Started ...
1
vote
1answer
46 views

Iptables rules to only whitelist SIP providers

I have an Asterisk box sitting behind an ADSL router/modem. There are no other services on the Asterisk box, just telephony. I am getting a lot of traffic which I think are SIP probes. I've ...
0
votes
0answers
58 views

Allow internet access to intranet only users using Nginx on Ubuntu

I need to allow some users who only have access to the intranet to access one specific internet site. I'm doing this by using Nginx as a reverse proxy. To test this, I would like to block all internet ...
0
votes
0answers
25 views

How do I “socksify” IPv6 TCP connections?

For IPv4, one can use REDIRECT iptables target and redsocks/tcpsocks. How to do the same for IPv6? I've tried ip6tables -t mangle -A PREROUTING -d 2600:: -p tcp --dport 80 -j TPROXY --on-port 4455, ...
0
votes
1answer
33 views

Redirect ports with iptables

I need to do redirect port 443 on all interfaces to 8080 on one interface using iptables on a box with 2 NICs. I also need to block pretty much anything else on those interfaces. Here is my iptables ...
2
votes
0answers
57 views

Block all outgoing traffic for a User running Wine apps

Good day, I'm using a lot of WINE apps under Linux which work just fine, but one thing I am specifically looking for right now is to block their access to the internet (outgoing), with exception of ...
0
votes
1answer
49 views

block network access to a domain (ubuntu)

I have a few ubuntu servers in various geographies. I want to block all outgoing connections from all ubuntu machines (all processes) to several domains, e.g. www.server.com. I know iptables can block ...
0
votes
3answers
34 views

outgoing ssh fails from only one machine on lan to outside network

I have multiple servers in my LAN (which I'll refer to as Box1), and they are all able to make outgoing SSH connections, except one that stopped recently, which I'll refer to as Box2 (actually, I'm ...
0
votes
2answers
51 views

Wifi sharing over eth0

There are a lot of tutorials how to share network connection with your usb wifi adapter and I tried lots of them but it is still not working. Can you please help me with my problem. Here is my network ...
0
votes
0answers
46 views

iptables error “FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c”

When I do this rule, the error shows up iptables -A INPUT -p tcp -m tcp -m multiport ! --dports 80,443 -j DROP I've also found some solutions. getprotobyname() just converts protocol names like tcp ...
0
votes
1answer
26 views

Cant connect to eth0 after wlan0 sharing with iptables

I wanted my Ubuntu server to act as a wifi hotspot. So I set up hostapd to allow wifi connections. I then setup dnsmasq to provide the DHCP settings. I then added the following iptables rules, so ...
0
votes
1answer
81 views

OpenWRT and iptables: redirect all traffic from ip1 to ip2

I'm aware of other questions with the same topic, but I couldn't get it to work. I'd like to forward inside my local network all traffic from ip1 to ip2. Only from inside the network, no outside. I ...
1
vote
3answers
140 views

How to block all ports except 80,443 with iptables? [duplicate]

Blocking all ports(in and out) is easy but it's hard with the word "except". I don't know any rules that satisfies the condition. PS: I know this question is nothing new. But in fact, I didn't find ...
0
votes
0answers
79 views

Route incoming traffic from VPN Clients through localhost-proxy on VPN server?

I’m still quite a newbie to Linux in general and I want to learn by establishing useful projects. My actual project is for a vpn-server to get rid of ads, cookies etc. for all clients. Meaning: No ...
1
vote
3answers
341 views

Limit incoming connections using iptables per IP

I need to limit access to some port per IP. Let's say 5 connections per minute - not more. I've seen iptables recent, connlimit and limit, but all of them are not fitting exactly what I need. ...
1
vote
5answers
84 views

How to forward traffic using iptables rules?

I am new to iptables and I have been doing Google searches for a few days now without finding a good solution to this problem. I have computer A with a public ip address (say 192.0.2.1) that can ...
0
votes
1answer
78 views

Asterisk server firewall script allows 2-way audio from incoming calls, but not on outgoing?

I'm running an Asterisk PBX on a virtual machine directly connected to the Internet and I really want to prevent script kiddies, l33t h4x0rz and actual hackers access to my server. The basic way I ...
0
votes
1answer
134 views

Equivalent iptables command on OS X 10.9

I want to redirect the tcp traffic temporarily to a custom port. On Linux, I use the following command: iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root -j REDIRECT and to ...
1
vote
1answer
31 views

Add IPtables rule by script at the request of another computer

I wonder, is it possible to make an script, which adds rule in iptables by request from other pc? I mean, script "knows" what to do, but addres for rule comes from request. And how do you think it ...