Netgate SG-1000 microFirewall

Author Topic: How to configure pfSense as a router for two internal LAN subnets?  (Read 453 times)

0 Members and 1 Guest are viewing this topic.

Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
I have two interfaces: LAN & LAB. I want machines on LAB to connect to machines on LAN and vice versa. I do not have a WAN interface as that is provided by another router in network 10.0.0.0/24.

LAN interface is 10.0.0.4
LAB interface is 10.0.1.4

I cannot ping a machine in network 10.0.1.0/24 from network 10.0.0.0/24 or vice versa. What have I done wrong?

Interfaces





Routing





Firewall rules






Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14826
  • Karma: +1375/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #1 on: January 01, 2018, 09:46:04 am »
your lab is actually your lan interface ;)  Notice the anti lock out rule on it.

But your rules are fine - did you set gateway on the machines correctly.  Software firewall running on devices in the other network blocking ping from different subnet, etc..
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline Grimson

  • Full Member
  • ***
  • Posts: 260
  • Karma: +36/-2
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #2 on: January 01, 2018, 09:46:45 am »
I cannot ping a machine in network 10.0.1.0/24 from network 10.0.0.0/24 or vice versa. What have I done wrong?

Any firewalls on those machines? For example the windows firewall is known to block pings from other subnets.

Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #3 on: January 01, 2018, 10:18:27 am »
your lab is actually your lan interface ;)  Notice the anti lock out rule on it.

But your rules are fine - did you set gateway on the machines correctly.  Software firewall running on devices in the other network blocking ping from different subnet, etc..
So when pfSense first configured the LAN interface was WAN so I renamed it and added a rule to allow traffic through. The LAB interface was the LAN interface, so I renamed that too.

There are no software firewalls on the machines in the other subnets. I tested this by pinging machines within the same subnet and they worked fine, and also checked that Windows Firewall is off on all profiles.

I tried to set up a static route but I got an error saying that the IP address was on the same subnet or something to that effect.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14826
  • Karma: +1375/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #4 on: January 01, 2018, 10:28:55 am »
"I tested this by pinging machines within the same subnet and they worked fine"

That is not a test of firewall...  That is a test of a firewall allowing something on the same subnet..

What is the gateway of these devices?  What is the mask on these devices.. If you don't point back to pfsense as the gateway, the machine can not answer.. If the mask is wrong on the client then it would never even send back an answer to pfsense to get sent to the client sending the ping because it thinks that is on its own network, etc.

Did you setup these clients with statics or did they get their IP from pfsense dhcp server?  Are these clients wired or wireless?  How are you isolating these 2 networks - do you have a smart switch, 2 different physical switches for each network?

There is ZERO to do on pfsense other than what you have done - create the interfaces on the network and create the correct firewall rules on those interfaces.  That you had some interface set as wan before.. Did you mess with outbound nat like set it to manual or something and are natting any traffic from these interfaces?

This is clickity clickity works out of the box.. So either you have something wrong on the clients, or you maybe dicked with outbound natting?  You put in a floating rule that blocks?  Without more info its impossible to say where your problem is.. But you would never need to create a route to a network that is directly connected to a router.  That is any router not just pfsense.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #5 on: January 01, 2018, 10:33:54 am »
Here's some more info. Machine snowdrop.duck.loc in network 10.0.1.0/24







On machine 10.0.0.3 in network 10.0.0.0/24:



« Last Edit: January 01, 2018, 10:46:23 am by mewsense »

Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #6 on: January 01, 2018, 10:41:29 am »
To add some more info as we cross-posted... :) thanks v. much BTW for your time!



Machine 10.0.1.1 is a Hyper-V VM hosted by a machine called fluorine on IP 10.0.0..9. Connected to a vSwitch called Lab.
pfSense is a Hyper-V VM also hosted on fluorine with two vSwitches one is LAN and connected to the physical NIC and the other is a vSwitch connected to LAB.

Machine 10.0.0.3 is a physical Windows 10 box.

The Hyper-V host and the desktop are connected via a gigabit hub.

EDIT:

Also add that there are no floating rules and I can ping both machines from within pfSense itself in the Diagnostics menu just fine. The devices can also ping the pfSense interface as well with no issues.
« Last Edit: January 01, 2018, 10:50:37 am by mewsense »

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14826
  • Karma: +1375/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #7 on: January 01, 2018, 10:53:33 am »
Your on hyper-V.. Should of mentioned that from the get go!!!

Where are your floating rules?

So looks like you can ping the gateway on your interface which is great... Ok ping the pfsense interface in the other network.. Ie ping 10.0.0.4 from your 10.0.1.x machine..  Does that work?

https://doc.pfsense.org/index.php/Virtualizing_pfSense_under_Hyper-V



- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #8 on: January 01, 2018, 11:02:50 am »


Floating rules are above, none configured. Sorry yeah should have mentioned Hyper-V but it really shouldn't factor.

On machine 10.0.1.1 I can ping pfSense interface 10.0.0.4 fine.
On machine 10.0.1.1 I cannot ping physical machine (my desktop) 10.0.0.3 (Request timed out).
On machine 10.0.0.3 I cannot ping pfSense interface 10.0.1.4 (Request timed out).

Odd.

Here's my Hyper-V switches in case it's relevant:








Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #9 on: January 01, 2018, 11:13:57 am »
Getting strange.

I have a VM on the Hyper-V host called neon.localdomain with IP 10.0.0.10.

I can ping that from machine 10.0.1.1, but machine 10.0.1.1 cannot ping the Hyper-V host interface 10.0.0.9 or my desktop 10.0.0.3.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14826
  • Karma: +1375/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #10 on: January 01, 2018, 11:21:11 am »
On machine 10.0.0.3 I cannot ping pfSense interface 10.0.1.4 (Request timed out).

Well that is going to be a problem..  What is the config of this machine, what is its gateway what is its mask.. Does it have any routes on it, vpn client?  Do a simple traceroute from  it to the 10.1.1.4 IP..

Hyper-V should not be a problem no - but there are some gotcha's with such a setup..
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #11 on: January 01, 2018, 11:30:50 am »
Here are the settings for machine 10.0.0.3. I do have Private Internet Access VPN client installed but it's not running. I also have the Hyper-V service on this machine but not currently using it. It is joined to domain duck.loc where machine 10.0.1.1 is the domain controller so quite important it can connect to it! :)



The default gateway is my Netgate device to go to the internet (10.0.0.1)

Here's the tracert

« Last Edit: January 01, 2018, 12:17:16 pm by mewsense »

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14826
  • Karma: +1375/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #12 on: January 01, 2018, 12:15:17 pm »
And look at the gateway... its 10.0.0.1 not 10.0.0.4 which is what you have pfsense lan IP set to..

How do you expect to get to the 10.0.1 network on pfsense if you point it towards your internet router?

Let me refer back to my first post ;) "did you set gateway on the machines correctly"

If your going to want to use a different gateway to get to the 10.0.1 network then you will need to put a host route on that machine that says hey you want to get to 10.0.1.0/24 use 10.0.0.4
« Last Edit: January 01, 2018, 12:24:17 pm by johnpoz »
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline mewsense

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #13 on: January 01, 2018, 12:24:45 pm »
A-ha!! :)

I added the second gateway into my machine and I can now ping 10.0.1.4 from 10.0.0.3. Feel like we're making some progress!

However, I can't ping 10.0.1.1 from 10.0.0.3...



What is odd is that I can ping the 10.0.1.1 machine from the LAN interface on pfSense:


Offline chpalmer

  • Hero Member
  • *****
  • Posts: 1787
  • Karma: +93/-3
    • View Profile
    • Home of Cablenut
Re: How to configure pfSense as a router for two internal LAN subnets?
« Reply #14 on: January 01, 2018, 12:30:21 pm »
You converted your WAN to LAB interface?

You have to disable all outbound NAT.

P.S. statements made by me are not necessarily condoned by the management of this fine organization.  http://badmodems.com