tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Special route and NPF



BERTRAND Joël a écrit :
    Hello,

    I'm using NPF to filter packets and I'm unable to find a solution to
a simple problem.

    Here is my network :

eth1(wan1)--+--Linux router-----+---eth0(lan1)
eth2(wan2)--+                   +---tap0(lan2)
                                +---tap1(lan3)



wm0(wan3) --+--NetBSD router----agr0(lan4)
tap0(lan3)--+


    On eth1, I have some inet4 addresses (/27). I want to route packets
from a specific address from eth1 to a server (192.168.10.103) on lan4.
Both routers are connected by lan3 (ethernet VPN).

    I have added some iptables rules in Linux router and all incoming
packets are routed to 192.168.10.103. 192.168.10.103 answers but as
Netbsd router's default route is over wm0, all packets send by
192.168.10.103 are sent over wm0 and not over tap0.

    How can I add a rule in /etc/npf.conf to route packets that come
from my linux router to be sent to this router ?

    Best regards,

    JB


I have checked my old IPF configuration. With IPF, it was possible to write :

pass in quick on agr0 to tap0:192.168.1.1 proto tcp \
	from 192.168.10.103 port=443 to any

	I would add a similar rule in NPF... Of course if it is possible.

	Best regards,

	JB


Home | Main Index | Thread Index | Old Index