Re: I have some questions about natd and firewall....^_^|||





董佑龍 <ss650120@xxxxxxxxxxxxxx> writes:

Hello:
My English is not good. I am sorry about this first. ~_~

You made yourself clear. Better than "good enough."

My system: FreeBSD + IPFW + NAT

Question 1: about NAT (in FreeBSD)
I built a "natd.conf" and it's contents are below:
redirect_address 192.168.0.1 140.115.10.22

I have 2 computers in the LAN: 192.168.0.200 and
192.168.0.201.
The redirect rule (above) will affect any connection which
destination is 140.115.10.22.
But, I don't want this rule to redirect the packets sent
from 192.168.0.200.(ie. This rule will affect all nodes inside the LAN but
192.168.0.200) Can I make it?

Yes. What you do is make sure that packets from that address don't
get sent to the divert socket in your ipfw ruleset. For example, you
could use a "skipto" rule before the divert rule.

Question 2: about Firewall (in FreeBSD)
Is there any argument in IPFW just like the function of the
"redirect_address" in NAT can be used? If it is, I think it may can solve
the above problem.

Not exactly. You can use a "fwd" rule, but the destination IP address
won't be changed. The machine you forward to won't accept the packets
because its address isn't 140.115.10.22.

--
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: WinRoute Pro
    ... I think Winroute unloads the connection from its NAT table so quickly ... it's so quick to purge its table that the reply packets ... Using packet filter rules with logging offers far more ...
    (comp.security.firewalls)
  • Re: Linux v Dedicated NAT routers - secure remote differences
    ... > NAT After IPSec ... > one-to-one address translation occurs it will ... I don't think this is the case - it was reported to me that my packets had ... This scenario is possible because ESP does not use the IP ...
    (comp.security.firewalls)
  • Re: [Full-Disclosure] NAT router inbound network traffic subversion
    ... There are more caveats, such as proximity to the source NAT device, ... > This should help clarify why NAT can not be considered a security ... >>University whether it is possible to direct packets behind a NAT ...
    (Full-Disclosure)
  • Re: nat problem
    ... to ensure that packets were using the router on which your NAT and route-map were configured. ... I made a new trace with wireshark (still for just one ping, ... then the packet is being dropped before or after NAT. ...
    (comp.dcom.sys.cisco)
  • Re: Why doesnt this NAT ping?
    ... Using the following NAT technique to ... permit tcp any host 6.22.8.115 eq 80 ... All IP packets that arrive to the router 'unsolicited' will engage in the ... with the *exception* of ICMP which will specifically bypass NAT in the order ...
    (comp.dcom.sys.cisco)