All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables forwarding packets on the same interface
@ 2010-11-18 20:26 Daniel Scott
  2010-11-18 20:56 ` Marek Kierdelewicz
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Scott @ 2010-11-18 20:26 UTC (permalink / raw)
  To: netfilter

Hi,

I have an iptables firewall configured as:

192.168.1.1

which handles the routing for our network.

I have added a separate router on:

192.168.1.2 which provides access to a different network:

192.168.10.0/24.

I have added a route on 192.168.1.1:

192.168.10.0 192.168.1.2 255.255.255.0 UG 0 0 0 eth1

so that packets from the network are routed through the .2 gateway.
However, iptables is blocking the packets when I route from a
different IP on the 192.168.1.0/24 network. i.e.

Ping from '1' network into '10' network:

Nov 17 17:18:30 fw kernel: [FIREWALL_LOG_CHAIN] IN= OUT=eth1
SRC=192.168.1.1 DST=192.168.1.42 LEN=112 TOS=0x00 PREC=0xC0 TTL=64
ID=25272 PROTO=ICMP TYPE=5 CODE=1 GATEWAY=192.168.1.2
[SRC=192.168.1.42 DST=192.168.10.10 LEN=84 TOS=0x00 PREC=0x00 TTL=63
ID=48895 PROTO=ICMP TYPE=0 CODE=0 ID=12034 SEQ=2 ]

DNS request from '10' network into '1' network:

Nov 18 10:19:50 fw kernel: [FIREWALL_LOG_CHAIN] IN=eth1 OUT=eth1
SRC=192.168.1.202 DST=192.168.10.10 LEN=71 TOS=0x00 PREC=0x00 TTL=63
ID=62146 PROTO=UDP SPT=53 DPT=38966 LEN=51

Am I doing this correctly? Can I 'route' packets back on to the same
interface, out via a different gateway. If so, can anyone tell me
which iptables/routing rule(s) I need to add to forward between
different network IPs on the same physical interface.

Thanks,

Dan

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

end of thread, other threads:[~2010-11-18 23:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18 20:26 iptables forwarding packets on the same interface Daniel Scott
2010-11-18 20:56 ` Marek Kierdelewicz
2010-11-18 21:37   ` Daniel Scott
2010-11-18 23:24     ` Marek Kierdelewicz
2010-11-18 23:39       ` Daniel Scott

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.