All of lore.kernel.org
 help / color / mirror / Atom feed
* Packet forwarding.
@ 2004-04-07 17:00 bdameron
  2004-04-07 17:14 ` Antony Stone
  2004-04-07 17:28 ` Alexis
  0 siblings, 2 replies; 8+ messages in thread
From: bdameron @ 2004-04-07 17:00 UTC (permalink / raw)
  To: netfilter

 I have 2 linux machines. One is accessable via the outside world (Internet
machine) the other has no outside connectivity (LAN Machine). I need to redirect
port 443 traffic to and from the LAN server via the Internet machine. Is this
possible with Iptables? I have setup packet forwarding but then the LAN server
tries to connect directly to the client machine instead of to the Internet
machine. Any direction appreciated.

-- 
Thank you,
Brad Dameron


^ permalink raw reply	[flat|nested] 8+ messages in thread
* packet forwarding
@ 2003-06-25 15:27 Drake Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Drake Henderson @ 2003-06-25 15:27 UTC (permalink / raw)
  To: netfilter-devel



I am trying to use libipq to forward packets.

Using the following iptable rules, forwarding works.

A. iptables -t nat -A PREROUTING -d 192.168.0.220 -p udp --dport 4488 -j
DNAT --to-destination 192.168.0.212:4488
B. iptables -t filter -A FORWARD -p udp -d 192.168.0.212 -j ACCEPT

In addition, adding rules to log the path of the packet based on the
script at
http://iptables-tutorial.frozentux.net/scripts/rc.test-iptables.txt, I
can see the packet move along the path

  mangle:prerouting, nat:prerouting, mangle:forward, filter:forward,
mangle:postrouting, nat:postrouting  (the right side path in the picture
at the below link)


http://iptables-tutorial.frozentux.net/chunkyhtml/traversingoftables.htm
l#TRAVERSINGGENERAL


The problem occurs when I change the target in rule A from DNAT to
QUEUE.  The handler program changes the destination of the packet and
then accepts it.  The packet, however, follows the path

  mangle:prerouting, nat:prerouting, mangle:input, filter:input (the
left side path in the picture)

Why, if the destination is changed at the nat:prerouting step, does the
routing decision not branch to the forward path instead of the input
path?

I know that the handler program is receiving the packets because if it
drops them, the path stops after nat:prerouting.


Thanks for you help,

Drake

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-04-07 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-07 17:00 Packet forwarding bdameron
2004-04-07 17:14 ` Antony Stone
2004-04-07 17:25   ` bdameron
2004-04-07 17:37     ` Antony Stone
2004-04-07 20:04       ` bdameron
2004-04-07 20:30         ` Antony Stone
2004-04-07 17:28 ` Alexis
  -- strict thread matches above, loose matches on Subject: below --
2003-06-25 15:27 packet forwarding Drake Henderson

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.