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
914 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 ...
-1
votes
1answer
653 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 ...
0
votes
1answer
600 views

how to telnet redirect ip and host using iptables

I try to telnet from PC 3 To PC 1 and it's redirect to PC 2 PC 1 : 192.168.0.1 PC 2 : 192.168.0.2 PC 3 : 192.168.0.3 i have command like this in PC 1: iptables -t nat -A PREROUTING -p tcp -d ...
0
votes
1answer
879 views

UDP packet and firewall

I notice when I send udp packets from computer A to computer B, B can receive the upd packets correctly but if I send udp packets from computer B to computer A the udp packets are not received A and ...
0
votes
1answer
536 views

show interfaces in iptables -L

Is there a way to show the network interfaces via iptables -L in Ubuntu 12.04? When I execute an iptables -L I get an output like this : Chain INPUT (policy DROP) target prot opt source ...
1
vote
1answer
141 views

iptables simple forwarding setup woes

I have iptables running on a host (acting as a firewall) in a Linux namespace with only one network interface: h2-eth1 (has an IP and MAC address) I have set up my switch to forward all packets to ...
3
votes
1answer
1k views

Linux iptables forward from ip1:port1 to ip2:port2

I connect thought tunnel to other machine like this: ssh user@ip -L2000:192.168.64.88:80 So on my local machine I want to configure iptables that way like I have a "native" access to ...
2
votes
4answers
463 views

Block all but http traffic on a network interface

I've got two network interfaces on an Ubuntu machine which go out to two different networks but both have internet gateways. I need to limit it so that any outgoing http requests it makes (ie ...
1
vote
2answers
2k views

iptables port based routing

I've been Googling this for days with no success. I connect to a VPN from my server from time to time and I'm trying to configure my Debian server to only use port 80 and 443 through the VPN and all ...
2
votes
2answers
385 views

How to send out some traffic via my vpn connection

I had a working setup where I could access all my work resources which are accessed via VPN going via my server previously however at some point recently this stopped working for no obvious reason. ...
2
votes
1answer
270 views

Restrict the number of http and https connections from a specified IP address to ten connections per minute

How I can restrict the number of http and https connections from a specified IP address to ten per minute usingiptables commands? I’ve tried this but it is not working: iptables -A INPUT -s ...
5
votes
1answer
4k views

How to configure a firewall on Centos using Vagrant and Chef

I've created a server box using Vagrant and Chef and everything is up and running correctly. However, when the box is installed from scratch the default iptables rules are in place and so I need to ...
3
votes
3answers
2k views

iptables - add rules not as root

One of our servers is being hit daily by a large number of spam bots. They're not able to post any spam, but they still try and end up slowing down the server for real users. To counter this, I have ...
3
votes
2answers
4k views

Using iptables SNAT based on source interface and ip address

I would like to change source ip address according to ip address and interface it came in. Let's consider following example: ----------------------------- | | | ...
0
votes
1answer
1k views

DD-WRT - Host-based forwarding

I would like to know if I can configure DD-WRT router, that operates as the server's network gateway, so support different forwards based on hostname (other than port 80). I've configured ...
3
votes
1answer
2k views

IP forwarding on the same network

I have a raspberry pi that I have put wifi on. I am also using its ethernet connection to bring internet to my XBox 360. I want to bridge these connections AND keep them both on the same network. For ...
0
votes
0answers
172 views

IPTables masquerading stops working

In a classical SOHO setup I am running a Debian box as router/firewall. For an unknown time now I have an issue, where the MASQUERADING on the output connection (PPPoE) stops working for one of the ...
0
votes
1answer
371 views

Iptables: allow specific ips on specific port

I am trying to allow a few IPs on port 80 and disallow all other from access port 80. Can someone suggest the iptables rules needed for this to occur?
3
votes
0answers
2k views

How do I configure DD-WRT to forward IPSec traffic to an internal server to support a road warrior configuration?

I use dd-wrt as my home router setup and that's been working fine. Now I wanted to figure out a way to be able to use my iPad to set up a IPSec tunnel to my home network while I'm on the road. PPTP ...
2
votes
1answer
861 views

How to route specific traffic through OpenVPN?

I'm running a server at home with rtorrent and apache2. I would like to route my rtorrent traffic via OpenVPN and since im kinda new to OpenVPN and iptables i would like to have a user friendly guide. ...
7
votes
1answer
832 views

Sharing transparently proxied Internet connection with PS3

I am trying to play a Japanese karaoke game on a PS3 but the latency is just horrendous and downloading songs takes forever. One recommendation I got was to turn my laptop into a SOCKS proxy by ...
1
vote
1answer
2k views

iptables: How to redirect port in Red Hat Linux (RHEL)?

I'd like to forward port 80 to 8080. So I tried to edit /etc/syscongfig/iptables: -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 But got: # service iptables restart ...
0
votes
1answer
2k views

DNS resolving broken after installation of bind due to iptables

I successfully configured my web server (Apache, PHP etc.) and blocked the ports I don't need using iptables, which was working perfectly fine. Today, I installed BIND and configured it, which also ...
0
votes
1answer
98 views

Accessing ports remotely

I have a fedora server on a local network which I can access through VNC. I am trying to install a JIRA plugin called Activity timeline, these are both built using Java. When I log into VNC and ...
0
votes
1answer
474 views

Port 6667 can't be reached outside of localhost

I've got IRCD-Hybrid installed with the following listen config: /* listen {}: contain information about the ports ircd listens on (OLD P:) */ listen { /* port: the specific port to listen ...
1
vote
0answers
249 views

Load-balancing: response packets not routed - iptables

I have a problem with iptables. I'm trying to setup a load balancer between 2 uplinks. I can mark packets and connections, use ip rule to choose routing table (so changing the gateway). But, when I ...
0
votes
1answer
393 views

How to setup IPtables to allow capture network traffic from a virtualbox VM configured with NAT

I would like to have a VirtualBox virtual machine that can't get online. I want to be able to monitor all network traffic attempts from the Linux host. So, if the virtual machine attempts to make a ...
6
votes
2answers
273 views

Open up firewall automatically to anybody who has successfully connected via SSH

I have a server which runs a few services. However, for security reasons, I configured the server so that nothing, except for SSH, is accessible from outside. What I'd like to do instead, though, is ...
2
votes
2answers
5k views

How to route specific traffic through OpenVPN?

I'm running a server at home with rtorrent and apache2. I would like to route my rtorrent traffic via OpenVPN and since im kinda new to OpenVPN and iptables i would like to have a user friendly guide. ...
1
vote
1answer
746 views

Filter multicast from WAN to specified vlan

I'm using ebtables to filter multicast IPTV from my Wireless and Wired Lan. Right now its configured like this: Router ( DD WRT ) VLAN1 (PC Network) VLAN2 (IPTV) I am using this command: insmod ...
1
vote
0answers
499 views

iCloud stuff stops working while connected to OpenVPN

I have a fairly simple OpenVPN setup on an OpenVZ VPS with Ubuntu 11.10. Client is the Viscosity client on Mac OS X 10.8.2, and after some testing, we can rule out the client as being part of the ...
16
votes
1answer
32k views

What are the iptables rules to permit ntp?

My server's clock is wrong because the firewall doesn't permit ntp traffic. What are the iptables rules required to allow the ntp client to get out and back? Any suggestions how to implement those ...
1
vote
0answers
546 views

tc/netem and iptables: Delay traffic only from specified ip and port

I have a Ubuntu Router with 2 network interfaces. eth0 is the private network and eth1 is the internet. What I want is the following: All packages (mostly udp) comming from a specified private ip ...
0
votes
2answers
1k views

Filezilla not showing directory listing?

I had downloaded iptables from server to my windows desktop .I edited some lines for opening port (2195) .after download i added some line for enabling port using this link ...
2
votes
1answer
225 views

amule, Fedora 14, iptables

I need to set iptables rules for aMule, but I am not sure which one are the right ones. Googling around, I have seen something like: iptables -I INPUT -p tcp --dport 4662 -j ACCEPT iptables -I ...
2
votes
1answer
260 views

dd-wrt: Keep source ip after port forward

I just started using dd-wrt on my wndr3700, but now all my incomming connections to a server inside the network gets the same source ip as the router. How can I change this back so I get the real ...
1
vote
0answers
153 views

How to unblock jabber on TI ADSL router with iptables

I have old but reliable Texas Instruments ADSL router. Board AR7RD; BUILD=061005; VERSION=3.7.1 If that matters... One thing that bothers me is that it somehow blocking my jabber (Pidgin ...
2
votes
1answer
681 views

IPTables - unknown error 4294967295

I've moved an old Slackware 11 installation from a physical PC to a virtualized in ESXi. Everything seems to work fine except for one rule in iptables, namely the row: iptables -t filter -I INPUT -m ...
4
votes
1answer
2k views

Access Apache server running in Fedora guest VirtualBox from host

I have trouble accessing Apache server from host. I’ve Fedora 15 VM VirtualBox installed on Windows 7. Within this VM I have Apache server running and working fine within the guest. Not sure what ...
8
votes
1answer
7k views

How to negate a range in iptables?

I've seen people use the exclamation mark (!) in multiple examples, but when I try to use it I get an error. The rule I'm trying: -A OUTPUT -m owner --gid-owner 1006 -d ! 192.168.1.0/24 -j DROP The ...
1
vote
2answers
761 views

How to “shut off” all networking on Linux from bash?

I'd like to write a bash/shell script that "turns off" the machine's ability to communicate over it's network card, effectively shutting down all networking. From the command line: # To turn all ...
2
votes
1answer
996 views

What is command to look list of redirect rules, iptables

im using command like this : iptables -t nat -A PREROUTING -p tcp -d 192.168.1.118 --dport 4080 -j DNAT --to-destination 192.168.1.118:4088 My question what is command to look all rules in the ...
12
votes
1answer
6k views

pfctl port forwarding in Mac osx?

-A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 -A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8080 -A POSTROUTING -s 10.0.10.0/24 -o ...
1
vote
1answer
82 views

why does this iptable rule work at a specific position in the chain

I'm running OpenWrt on my router, which allows me to run applications such as apache and emule. I installed emule but I keep getting lowid, indicating that my port is misconfigured. I was able to ...
1
vote
0answers
125 views

No output returned when curl ing any URL in Red Hat 6 but the same url works in lynx browser

I am trying to install some packages in Python using easy install. But i get a 'Download Error' for any package i try to install. So i tried to test if internet is accessible at all from the machine ...
2
votes
2answers
2k views

OSX: Mimic Ubuntu IP Masquerading via iptables with ipfw

Good day, I am attempting to replicate a setup I have between a router and an Ubuntu PC, and have the same setup working on my MacBook (10.6, Snow Leopard). First, I have a router that has a USB ...
0
votes
1answer
276 views

How to resolve conflict in iptable rules

In Ubuntu 12.04 and above there are no iptable rules defined by default. I added the following rule and it works fine:(Update) iptables -A INPUT -p tcp -j QUEUE -m string --string xyz --algo bm ...
0
votes
1answer
580 views

MIxing RFC1918 NATed and public IP addresses using IPTABLES

I wish to host a SIP server and DNS at the end of an ADSL2 connection. My current network sits behind an iptables firewall which runs on a Linux box with two Ethernet interfaces, the WAN interface ...
0
votes
0answers
168 views

1:1 NAT IP address using iptables

Suppose I have 2 internal networks: 1.1.1.0/24 and 1.1.2.0/24 I would like to NAT a specific IP address from one network to the other, in which the new address would be obtained via DHCP. For ...
0
votes
1answer
108 views

IPTables Allowing Access without Rules

I'm sure this is mostly my misunderstanding of how iptables works, but I've set up some rules... -A INPUT -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT -A OUTPUT -p tcp --sport 22 -m ...