* using libipq to create a router
@ 2003-09-23 22:25 Eduardo Costa
2003-09-24 1:36 ` Henrik Nordstrom
0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Costa @ 2003-09-23 22:25 UTC (permalink / raw)
To: netfilter-devel
Hi, there !
I want to create a little program to route connections with libipq and
nat table.
Something like that: client connects with master server, but it will
only route this connection to another computer.
Pretty simple, but I need this info to create something bigger. I tried
to change the IP header packet, but somehow it only worked with ICMP. I
guess it's a problem with nat/conntrack, but there's no example mixing
conntrack and libipq.
BTW, I don't want to make a kernel module and a libipt_XXX.so, because I
think it's a solution bigger than the problem.
Thanks in advance,
Eduardo Costa
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using libipq to create a router
2003-09-24 1:36 ` Henrik Nordstrom
@ 2003-09-23 22:45 ` Eduardo Costa
2003-10-11 20:32 ` Henrik Nordstrom
0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Costa @ 2003-09-23 22:45 UTC (permalink / raw)
To: Henrik Nordstrom; +Cc: netfilter-devel
So, what happens if I want to NAT a trivial protocol, like HTTP ?
BTW, is there any "hello world" example for conntrack ? I've played
creating kernel modules pretty easy, but the documentation about
creating new routing nat targets are poor. The only good examples are
'masquerade' and 'redirect', but they lack comments.
Thanks,
Eduardo Costa
Henrik Nordstrom wrote:
>You can't NAT non-trivial protocols via libipq unless you are implementing
>the full conntrack+nat in your application and not using the kernel
>conntrack/nat support at all (must not be loaded into the kernel). Any NAT
>done via libipq does not play well together with conntrack and the
>iptables nat engine is completely unaware of your packet modifications.
>
>For NAT together with iptables conntrack/nat you really need to use kernel
>modules in the nat iptable.
>
>Regards
>Henrik
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using libipq to create a router
2003-09-23 22:25 using libipq to create a router Eduardo Costa
@ 2003-09-24 1:36 ` Henrik Nordstrom
2003-09-23 22:45 ` Eduardo Costa
0 siblings, 1 reply; 4+ messages in thread
From: Henrik Nordstrom @ 2003-09-24 1:36 UTC (permalink / raw)
To: Eduardo Costa; +Cc: netfilter-devel
On Tue, 23 Sep 2003, Eduardo Costa wrote:
> Pretty simple, but I need this info to create something bigger. I tried
> to change the IP header packet, but somehow it only worked with ICMP. I
> guess it's a problem with nat/conntrack, but there's no example mixing
> conntrack and libipq.
You can't NAT non-trivial protocols via libipq unless you are implementing
the full conntrack+nat in your application and not using the kernel
conntrack/nat support at all (must not be loaded into the kernel). Any NAT
done via libipq does not play well together with conntrack and the
iptables nat engine is completely unaware of your packet modifications.
For NAT together with iptables conntrack/nat you really need to use kernel
modules in the nat iptable.
Regards
Henrik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using libipq to create a router
2003-09-23 22:45 ` Eduardo Costa
@ 2003-10-11 20:32 ` Henrik Nordstrom
0 siblings, 0 replies; 4+ messages in thread
From: Henrik Nordstrom @ 2003-10-11 20:32 UTC (permalink / raw)
To: Eduardo Costa; +Cc: netfilter-devel
On Tue, 23 Sep 2003, Eduardo Costa wrote:
> So, what happens if I want to NAT a trivial protocol, like HTTP ?
HTTP is not trivial. HTTP is on top of TCP which is not trivial.
Regards
Henrik
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-10-11 20:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-23 22:25 using libipq to create a router Eduardo Costa
2003-09-24 1:36 ` Henrik Nordstrom
2003-09-23 22:45 ` Eduardo Costa
2003-10-11 20:32 ` Henrik Nordstrom
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.