0

I have two pfenses (say p1 and p2) in two separate networks. Each has a public IP. There is an internal network on each side (say n1 and n2). I want to connect these two networks through these two pfsenses:

p1:1.2.3.4
n1:10.10.10.0/24

p2:2.3.4.5
n2:172.16.1.0/24

I want to send traffic from n1 to n2. for example I want to send traffic from 10.10.10.30 to 172.16.1.40. I want a solution like linux ip route. in this example traffic should go from 10.10.10.30 to 1.2.3.4 and from 1.2.3.4 to 2.3.4.5 and finally from 2.3.4.5 to 172.16.1.40. there is a access from pf1 to pf2 with a cable on extra NIC (say optx) how can I do that?

1
  • 1
    The routers need to share a common network between them, or they need another router to route between the separate networks.
    – Ron Maupin
    Feb 11 at 6:30

2 Answers 2

1

Not clear on PFSense, whether it is allowed/on topic here or not, they do sell paid support so I think it's ok. The short answer to how to achieve what you want is a Lan to LAN (also called Site to Site) VPN tunnel.

This guide covers how to do it.

https://docs.netgate.com/pfsense/en/latest/recipes/ipsec-s2s-psk.html

2
  • thanks. there is a access from pf1 to pf2 with a cable on extra NIC. I don't want to use VPN. Feb 10 at 22:20
  • I would still recommend treating that as a WAN connection and running a VPN over it for security (encryption) or simply connect them and treat it as a WAN connection with a static route configuration if necessary. Firewall policies will allow the access you need through the 2 firewalls. Feb 11 at 1:20
0

For two routers to talk to one another they need to share a network.

You'll need a dedicated port or at least a VLAN for that (the VLAN you could connect through a switch if there aren't enough ports on the pfSense). Alternatively, a VPN tunnel could be used, but you don't seem to need that.

If you then configure that port on each pfSense with e.g. 10.255.255.254/31 or 10.255.255.255/31 they should be able to ping each other. You can configure OSPF between them or use static routes to tell them the network behind the other pfSense: on p1: 172.16.1.0/24 -> 10.255.255.255 and on p2: 10.10.10.0/24 -> 10.255.255.254.

Finally, set up firewall policies to permit or deny communication between the networks and you're done. For simplicity, you might want to allow outbound traffic generally and control permissions with inbound rules only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.