Hello dear FreeBSD community,
I just recently began using this great OS and while I do have a background in Windows networking, I'm very new to how I can achieve certain tasks on FreeBSD, especially with jails.
Basically I'm trying to figure out how to route traffic from one jail to another, all managed and setup from the host system itself (preferably one ruleset, so I only have to connect to the host and configure everything there if changes come along).
So here's my layout (default-gateway is my router at .1):
FreeBSD ip=.50 igb0 ipfw0 bridge0 epair0a epair1a default-gw=.1
-> openvpn-jail ip=.201 epair0b default-gw=.1
-> other-jail ip=.200 epair1b default-gw=.1
So what I want to achieve is that the 'other-jail' at .200 does not communicate through my router, but instead sends all traffic to the 'openvpn-jail' at .201
Currently I've enabled pf on my host (.50), but I haven't created any rules yet. This is the part where I'd be glad if someone could hold hands and explain this to me with examples.
1. I assume I'll have to change the default-gateway for the 'other-jail' to .201, or would it need to be the host at .50, which is ultimately where I would set up the rules, correct?
2. Do I just enable the ipv4 gateway and create a "rdr" rule on .50 then? Something like:
Would that be enough to achieve the goal I have in mind here?
Thank you for any help and understanding,
happy holidays
I just recently began using this great OS and while I do have a background in Windows networking, I'm very new to how I can achieve certain tasks on FreeBSD, especially with jails.
Basically I'm trying to figure out how to route traffic from one jail to another, all managed and setup from the host system itself (preferably one ruleset, so I only have to connect to the host and configure everything there if changes come along).
So here's my layout (default-gateway is my router at .1):
FreeBSD ip=.50 igb0 ipfw0 bridge0 epair0a epair1a default-gw=.1
-> openvpn-jail ip=.201 epair0b default-gw=.1
-> other-jail ip=.200 epair1b default-gw=.1
So what I want to achieve is that the 'other-jail' at .200 does not communicate through my router, but instead sends all traffic to the 'openvpn-jail' at .201
Currently I've enabled pf on my host (.50), but I haven't created any rules yet. This is the part where I'd be glad if someone could hold hands and explain this to me with examples.
1. I assume I'll have to change the default-gateway for the 'other-jail' to .201, or would it need to be the host at .50, which is ultimately where I would set up the rules, correct?
2. Do I just enable the ipv4 gateway and create a "rdr" rule on .50 then? Something like:
Code:
rdr on epair1a inet proto tcp to port {custom application port} -> epair0a
Would that be enough to achieve the goal I have in mind here?
Thank you for any help and understanding,
happy holidays
Last edited: