iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

1
vote
2answers
252 views

iptables and logs

Suppose I add an IP to iptables blocking for exim, dovecot and FTP and this IP visits my server again. Is there any log of this visit so I can confirm the IP was trying to reach the server again but ...
1
vote
2answers
85 views

Reject ssh connections made from proxies

I was seeing this question which was concerned with blocking access to the users who do not belong to a particular region. I am sure that blocking is possible but I see there is a workaround to this. ...
1
vote
1answer
125 views

IPv6 firewall rules seem to impede all connections

After deciding that my small server needed a firewall, I used ferm to configure iptables and ip6tables for me (this question should be tagged ferm, but I cannot create the tag). I am using the same ...
1
vote
1answer
141 views

How to log incoming icmp traffic?

I am watching my ip6table and observing an icmp packet arriving and getting dropped at the rate of 1 per second. I am trying to find out what that message is about. I tried using tcpdump (it is ...
1
vote
1answer
4k views

iptables forward all traffic to interface

I have two interfaces eth1 and eth0. I want all traffic on eth0to be forwarded to eth1. I created an iptable rule like this: iptables -A FORWARD -s 0/0 -i eth0 -p tcp -o eth1 -j ACCEPT But this ...
1
vote
1answer
97 views

Is this what it looks like in the terminal on the client side when you are blocked out via fail2ban?

I am a new server admin. I just setup fail2ban on an ubuntu 12.04 VPS. I used this tutorial. Then I tried to login to the system via ssh from a friend's machine. It is showing "operation timed out." ...
1
vote
3answers
2k views

How to change user agent on all http requests made from my machine with Squid intercepting proxy?

I'd like to change the user agent on all HTTP requests made from this machine. It's easy enough to change the user agent in each browser, but other apps also make http requests. In particular, there's ...
1
vote
1answer
449 views

How do I shut down ports remotely without shutting myself out?

I have an Ubuntu 11.04 server in a remote location on another continent, so I have no physical access to it. I only interact with it by ssh (and scp), and intend to only ever interact with it that ...
1
vote
1answer
64 views

How does a transparent SOCKS proxy know which destination IP to use?

There are two SOCKS proxies that I know about that support transparent proxying for any outgoing TCP connection: Tor and redsocks. Unlike HTTP proxies, these SOCKS proxies can transparently proxy any ...
1
vote
2answers
171 views

Drop TCP packets and prevent TCP retransmission

I have an application that sends TCP data to a server. My server is made to intentionally drop the packets sent by the application, and as a result the client retransmits the packets. I need to ...
1
vote
1answer
40 views

Confused by different output from iptables -L

I keep following this tutorial using a bash shell on ubuntu 12.04 as I open more and more ports on my server. I usually open up ports like this sudo iptables -A INPUT -p tcp --dport PortNumberToOpen ...
1
vote
1answer
2k views

How to modify iptables rules via editing a file rather than interacting via command line?

In the history, i would simply edit a file and then reboot the whole server. i would clone the line that had port 22 open change it to 80 and then save the file.. and reboot the whole system so ...
1
vote
1answer
59 views

View blocked address from sshguard

How can I view all the addresses that sshguard has blocked to iptables?
1
vote
2answers
116 views

What network protocols do database servers use?

I have a postgres 9.1 server running on the default port 5432 on an ubuntu 12.04 cloud server. I want to open up the port so I can make remote queries -- but I have to open the port on IP tables, ...
1
vote
1answer
141 views

Redirecting all IP over USB traffic to a fixed address

I'ma bit of a network newbie, so apologies for the inaccurate vocabulary. Say I have a device connected by IP over USB to my computer (running Ubuntu), that connects to 10.0.0.1. I configured my ...
1
vote
2answers
431 views

iptables: what the difference between filter and mangle

I am using iptables to to mark the package and want to route based on the marks. First I added the ip rule: sudo ip rule add fwmark 1 prohibit (The "prohibit" is just for test, I will change it ...
1
vote
2answers
960 views

Missing iptables file on directory /etc/init.d/ (Fedora 17)

Is the iptables file in Fedora 17 moved from /etc/init.d/ to /etc/sysconfig/? I need do some patching to the iptables file to solve the firewall problem (Setting chains to policy ACCEPT: security raw ...
1
vote
1answer
358 views

What does the route Dest: 123.123.123.123, GW: 0.0.0.0 mean?

I have a route table: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 123.123.123.123 0.0.0.0 255.255.255.255 UH 0 0 0 ...
1
vote
1answer
934 views

How does iptables MASQUERADE work on the incoming side?

I'm still reading the iptables manual page and other documents and digging around questions and their answers. This is the problem which arises. When we setup the NAT we use a POSTROUTING rule such ...
1
vote
1answer
517 views

Allow user to see how many iptables rules are loaded, but not actual contents?

I want to allow user to check how many rules are present in filter table, but not able to view actual rules, is that possible? literally I mean iptables -L | wc -l (I know it's faulty), but sudo ...
1
vote
1answer
3k views

Redirect Output with Iptables

Is possible on Debian to change the port of packets that are going to a specific port, using iptables? Example: I want packets going in the outbound direction to a.b.c.d for port 1723 to be ...
1
vote
1answer
2k views

Redirect http using iptables for an ip range

I have a range of ip addresses (10.13.13.10-19) that I want to redirect all outgoing http traffic to an internal webserver. So if someone in that range tried to access any site, the html from my ...
1
vote
1answer
2k views

Why can't I add any iptables rule?

Why can't I add any iptables rule? root@ROUTER:~# iptables -L INPUT -v Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 6934 685K ACCEPT 0 -- any ...
1
vote
2answers
932 views

iptables rule for local network with free internet blocking unrequested connection from internet to server?

I have a home server (with slackware 13) with a eth0 for the local network and a eth1 for the internet (cable modem with dynamic ip). While I do want to learn more about iptables I am still on the ...
1
vote
2answers
26 views

iptables is ignoring rules?

I've found some strange traffic through tcpdump (traffic is ongoing always): 13:00:13.203754 IP 1.2.3.4.1028 > 188.113.188.16.56881: UDP, length 103 13:00:13.204396 IP 1.2.3.4.1028 > ...
1
vote
1answer
22 views

Iptable forward interfaces for gateway machine

I have two Ethernet interface being configured to use as system gateway ex: eth1: 10.10.1.0 eth2: 10.10.2.0 I want to forward all the packets which are coming to the 10.10.2.0 gateway contacting ...
1
vote
3answers
22 views

Why did this iptables rule block my webserver?

I was setting up Mathematica on a remote server, and needed access to the UI. I set up VNC according to http://wiki.centos.org/HowTos/VNC-Server , and got it working, which involved making an ...
1
vote
1answer
588 views

Whitelist IP's in CentOS 7

I want to setup CentOS 7 firewall such that, all the incoming requests will be blocked except from the originating IP's that I whitelist. And for the Whitelist IP's all the ports should be accessible. ...
1
vote
1answer
141 views

Configure NAT filtring behavior with iptables

I'm using this rule to configure SNAT: iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:4000 I want to specify a rule to filter out packets not destined to the internal ...
1
vote
1answer
257 views

Randomize external port when doing NAT with iptables

I want to configure a NAT behavior different from the default one implemented by iptables. In this example: iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:2000-400 The ...
1
vote
1answer
60 views

IPtables on ubuntu 12.04

I've problem with iptables on ubuntu 12.4. I type ufw status, it show result Status: inactive but I type iptbles -L -nv, it still shows many rules, and these rules are running. I can't understand.
1
vote
2answers
111 views

iptables ignores other rules after add last rule

I have written these rules in iptables: -A FORWARD -i eth1 -o eth0 -p icmp -m limit --limit 1/hour --limit-burst 5000 -j ACCEPT -A FORWARD -i eth1 -o eth0 -p udp -m limit --limit 1/hour --limit-burst ...
1
vote
1answer
78 views

How to measure the time a packet spends on the system(router)?

I have a streaming system and one if its components is a router/firewall. I'm using iptables for setting the required behaviour on the router. I'm having performance issues in forms of a constant ...
1
vote
2answers
3k views

FTP and iptables. Connection fails but ports are open

I installed proftp on my machine. With iptables disabled I can connect to the machine, using ftp-client or telnet. With iptables connection fails - telnet says "Connection failed" # works telnet ...
1
vote
1answer
111 views

Where does Iptables store blocked IPs

I need to set up a shell to block DDOS attacks , but in that script, it's reading some Blocked IPs from /etc/sysconfig/iptables. The problem is that I don't have this directory, So I'm wondering ...
1
vote
2answers
880 views

SSH tunneling through a busybox router

I have a busybox router and I'm able to login to the console using telnet & I also have access to the web interface. My question is, how can I create an ssh tunnel from my local network through ...
1
vote
1answer
107 views

netfilter's configuration to allow openvpn

I've got a debian server at home, that I use to have a VPN access to my home computers. I've redirected the openvpn port on the port 2000 : in my file "server.conf", I've added this : #Server mode ...
1
vote
1answer
1k views

How do I port-forward 169.254.169.254-bound packets from libvirt/KVM guests to localhost?

This is a followup to What's the best way to have a 169.254.169.254 address local to my laptop?. Short story: 169.254.169.254 is the "well known" address of cloud metadata services for EC2 and for ...
1
vote
1answer
2k views

iptables forwarding and routing

In fact, this question is about openwrt and CoovaAP, but I guess it's the same in other linux distributions. I've two interfaces, a "wan" and a "wlan" interface. Is there by default any filter, ...
1
vote
1answer
563 views

How to provide a “guest LAN” on one ethernet device

I have an always-on machine running Debian/Squeeze with a couple of ethernet ports (it's doing various serverish jobs, including DHCP) and a LAN on each. eth0 is on 192.168.7.* and has access to the ...
1
vote
1answer
1k views

Losing wifi connection to access point after a few minutes (hostapd, dnsmasq, iptables)

I'm using a laptop as a wifi access point. Since this laptop has the proper hardware, I was able to use hostapd. I wanted to use DHCP and iptables/NAT forwarding instead of a bridge to have more ...
1
vote
1answer
193 views

iptable rule to redirect only https handshake?

I was reading this interesting article today: http://www.moserware.com/2009/06/first-few-milliseconds-of-https.html A crazy thought came to mind...Is it possible to write an iptable rule that only ...
1
vote
2answers
203 views

How can I use the same IP from the Internet and intranet?

I have an Ubuntu firewall box (Alma), at the office, with a web server on it. It looks like this: [Internet] <-> [DSL Router] <-> [Alma] | ...
1
vote
1answer
540 views

How can I move firewall settings from one Debian Squeeze web server to another?

I configured a Debian Squeeze virtual machine in VMWare on my laptop. I configured it with a very restrictive set of firewall rules using Firestarter. I then uploaded a copy of its disk image to use ...
1
vote
2answers
723 views

How to Optimize an IPTABLES script?

If I could list that which iptables rule has how many matched packets, then I could create a better/faster iptables script that's faster. That rule would be at top/first that has the more packets ...
1
vote
1answer
883 views

Sharing bandwidth between IPs

There are 200 users in my network, and these users are in two AD groups and cannot set specific IP ranges for each group. I want to set, for each group, the amount of bandwidth that can be shared ...
1
vote
1answer
20 views

How to wrap iptables commands around Ruby webrick server going up and down in a single command/script?

I would like to use this Ruby WEBrick server solution for on-demand showcasing of some random web pages. So I set up some forwarding exception on my adsl modem local web interface(192.168.2.1). Then ...
1
vote
1answer
49 views

Can I forward all traffic on a port to a complete different IP address?

Here's my situation. I own a VPS that provides 3 public IPs / public interfaces. let's call these IP address V1 (on eth1), V2(on eth2) and V3 (on eth3) At home, I have a router. The home WAN IP is H. ...
1
vote
1answer
27 views

Does -o and -i make sense when the target host is already connected to the interface specified?

iptables -A FORWARD -s 192.168.20.7 -d 10.10.48.3 -p tcp --dport 25 -o eth1 -j ACCEPT iptables -A FORWARD -s 10.10.48.3 -d 192.168.20.7 -p tcp --sport 25 -i eth1 -j ACCEPT Tuning the firewall of my ...
1
vote
1answer
196 views

Curious about strange ICMP type 3 code 10 traffic to my IP address

My firewall (iptables) logs some strange ICMP type 3 code 10 traffic that I am curious to understand (specifically how or if this could be an exploit of some sort). Type 3 = Destination ...