cheking TTL with the help of iptables...

Posted on 2004-03-22
Last Modified: 2010-03-18
Hi U all

I've got a small problem (may be). I'm responsible for distributing an internet in a small LAN and now one problem occured to me. I want the netconnection, I'm offering to my clients, not to be possible for redistributing.

So, I'm using RED HAT 9.0 and my idea is by iptables to achieve my goal. It should be someting like this:
iptables -t mangle -A OUTPUT -j TTL --ttl-set 1
But it's a module what's the problem. I can't use the TTL without patching the kernel with the necessary module.

Is it possible to achieve my goal without recompiling the kernel? If yes (I hope), how?

10x for any help
Question by:gottin
  • 3
  • 3
LVL 40

Expert Comment

ID: 10653711
I'm not sure that I understand what you mean by "not to be possible for redistributing". Could you elaborate?

Author Comment

ID: 10653791
well, it looks that it's not perfectly clear what I mean.
suppose the next topologi:           _       __
 ---------        -----------       |w|      --
|my server|<---->|client PC 1|<---->|i|<--->|PC|
 ---------        -----------       |t|      --
                                    |h|      --
So, I want to configure "my server" this way that the PCs behind "client PC 1" do not have a network connectioning by simply setting the "client PC 1" as a firewall.

Tha question is: Is it possible to configure "my server" with the help of iptables (without recompiling the kernel)? If yes, how?

I hope it's clearer this time :)
LVL 40

Expert Comment

ID: 10653902
It sounds like you want to prevent a client from being able to set up a NAT'ing gateway and having multiple machines behind it. I don't believe that any sort of iptables rule is going to be able to detect or block this since the very nature of NAT means that all traffic, to an upstream node's view, will appear to be from/to the client IP. You might be able to infer that someone was doing this by traffic analysis, but even that gets iffy unless the volume is obviously much, much greater than could be generated by a single user.
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.


Author Comment

ID: 10659369
well, the client PC are in most cases Windows machines and I think they are not able to use iptables. Well I just wanted to send the packets from my machine with TTL=1, so they can be alive not longer then the first PC, but after reading a bit bore I found that the onlies way to do this by the help of iptables is by patching the kernel and recompiling it.

So, I found my answer.

I want to close this question.

Thank U jlevie for trying to help.
LVL 40

Accepted Solution

jlevie earned 150 total points
ID: 10660038
I don't think that would help even if you did patch the kernel if someone was running a NAT'ing firewall on one of the windows boxes (ICS, WinGate, etc). The destination, as far as your Linux gateway is concerned, is the outside IP of such a system. The NAT'ing S/W is going to re-write the packet before passing it on to a system inside of the NAT'ing gateway and I think it will reset the TTL then.

Author Comment

ID: 10732877
10x for helping me!



Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Sending a Secure fax is easy with eFax Corporate ( First, just open a new email message. In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now