Re: confusion with natd

From: Juhani Tali (juhani_at_kernel.ee)
Date: 10/01/04

  • Next message: Gleb Smirnoff: "[TEST/REVIEW] bridge(4) and ng_ether(4) interaction"
    Date: Fri, 01 Oct 2004 10:38:31 +0300
    To: miha@ghuug.org
    
    

    Mikhail P. wrote:
    > On Friday 01 October 2004 06:51, Juhani Tali wrote:
    >
    > Did not quite understand what you meant here.

    ----
    ended up running natd on tun0 of HOST_B as:
    natd -interface rl1
    natd -port 8568 -interface tun0
    ----
    I should have read it as HOST_A, because HOST_B does not have a rl1, 
    only rl0.
    ----
    ipfw add 4 divert 8568 ip from 192.168.0.3 to any out xmit tun0
    ipfw add 6 divert 8568 ip from any to any in recv tun0
    ----
    replace these with
    ipfw add 4 divert 8568 ip from 192.168.0.3 to any
    prior to this rule the packet was not destined to go out through tun0 
    but rl1, so the (xmit tun0) condition does not match.
    ipfw add 6 divert 8568 ip from any to any in recv tun0
    or perhaps
    ipfw add 6 divert 8568 ip from any to 192.168.10.1
    > I can translate 192.168.0.0/24 
    > into tunnel, but as my original message states, only packets to HOST_A fall 
    > into that route, any other packets (even ipfw has "ip from 192.168.0.3 to 
    > any") travel out regular way (not via tun0). That's the most confusing part 
    > ("any != "any"), and I'm stuck there.
    Hope this works.
    Juhani Tali
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    

  • Next message: Gleb Smirnoff: "[TEST/REVIEW] bridge(4) and ng_ether(4) interaction"

    Relevant Pages

    • Re: confusion with natd
      ... I should have read it as HOST_A, because HOST_B does not have a rl1, ... ipfw add 6 divert 8568 ip from any to any in recv tun0 ...
      (freebsd-isp)
    • Re: natd port redirect
      ... You need also some rules for ipfw: ... Divert incoming packets to natd: ... ipfw add divert natd tcp from any to me in via tun0 ...
      (comp.unix.bsd.freebsd.misc)
    • Re: ipfw - please help.
      ... The divert rule ... setup keep-state ... 00080 skipto 800 icmp from any to any out via tun0 keep-state ... 00370 allow tcp from any to 59.167.244.137 dst-port ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Bandwidth limiting for eMule ports
      ... > inside interface? ... > When I see MRTG graphs for ipfw it still shows bandwidth more than it ... ipfw pipe 2 config bw 5kbyte/sec queue 10kbytes ... ipfw add 01900 pipe 1 tcp from any to any out xmit tun0 ...
      (freebsd-hackers)
    • Re: Which interface do I put natd and ipfw
      ... I need help to set up firewall on my freebsd 5.1 box. ... I need to know which of the 3 interfaces do I put the natd and ipfw. ... I have traffc coming in through the tun0 from outside to the LAN. ... How do I configure the tun0 interface for the firewall since I do ...
      (freebsd-questions)