Hello
I have a freeBSD box acting as a router with many interfaces. I want separate the networks so that they don't "directly" reach other unless I specify this using a firewall.
So, I want to force all traffic going the any host in the subnet 2.0.0.0/8 to use the em0 interface and ultimately reach the 10.0.0.1 host
Then, I want to force all traffic coming from the 2.0.0.0/8 subnet going to 10.0.0.1 specificly to also use the em0 interface.
em0 is the gateway with the IP address 2.2.2.2
It is not the defaultrouter.
I have added the following to my routing table:
I have tried to use natd.conf as follows:
I am not really sure if my usage of redirect_proto is correct. But I used it anyway. It doesn't work the way I want it to.
In simple pseudocode, what I want to achieve is:
Any suggestions?
I have a freeBSD box acting as a router with many interfaces. I want separate the networks so that they don't "directly" reach other unless I specify this using a firewall.
So, I want to force all traffic going the any host in the subnet 2.0.0.0/8 to use the em0 interface and ultimately reach the 10.0.0.1 host
Then, I want to force all traffic coming from the 2.0.0.0/8 subnet going to 10.0.0.1 specificly to also use the em0 interface.
em0 is the gateway with the IP address 2.2.2.2
It is not the defaultrouter.
I have added the following to my routing table:
# route add -inet 2.0.0.0/8 2.2.2.2
I have tried to use natd.conf as follows:
Code:
interface em0
use_sockets yes
-redirect_proto ip 2.2.2.2[2.2.2.3[10.0.0.1]]
I am not really sure if my usage of redirect_proto is correct. But I used it anyway. It doesn't work the way I want it to.
In simple pseudocode, what I want to achieve is:
Code:
if source=10.0.0.1 && destination=2.0.0.0/8
redirect traffic to 2.2.2.2 and let it deal with it
if source 2.0.0.0/8 && destionation=10.0.0.1
redirect traffic to 10.0.0.1 through 2.2.2.2 (the gateway)
Any suggestions?