OPNsense Forum

English Forums => General Discussion => Topic started by: robertkwild on November 17, 2018, 11:40:04 pm

Title: adding static routes for a network so it can see the internet
Post by: robertkwild on November 17, 2018, 11:40:04 pm
hi all,

im trying to add a static network so that network gets internet access

the static network im trying to add is 172.17.1.1/24
my gateway is 10.100.1.253
my vm is 172.17.1.1
opnsense ip is 10.100.1.254
my windows pc is 10.100.1.5

on my opnsense router i can ping my vm and my vm can ping my windows pc so my interlanning network works but i cant get my vm to ping 8.8.8.8

i attach pictures and im wondering if anyone of you can help as i feel im doing everything right

thanks,
rob
Title: Re: adding static routes for a network so it can see the internet
Post by: robertkwild on November 19, 2018, 11:35:26 pm
my new static route i added doesnt appear in "System: Routes: Status"

i was hoping to find my static route going out my gateway

172.17.1.1/24 - 10.100.1.253

but i dont see it

any help please

thanks,
rob

Title: Re: adding static routes for a network so it can see the internet
Post by: robertkwild on November 20, 2018, 12:35:59 am
sorted

i deleted all the gateways/routes on the web and i added it via ssh

route add -net 172.17.1.0/24 10.100.1.253

i also added a manual outbound NAT rule for this new network and added a LAN rule for this network
Title: Re: adding static routes for a network so it can see the internet
Post by: asood on March 05, 2019, 02:44:36 pm
I ran into a very similar problem.

I finally figured out why it didn't work. I was missing the step of adding a firewall rule which is applied before the default lan to wan via default gateway rule. I don't know if I just missed it or it isn't included in the documentation.
So the solution for me was to create another firewall rule
to allow from the lan subnets
with the destination subnet of the static route
via the desired gateway of the static route.

And it must be applied before the default lan to wan via default gateway rule.
Title: Re: adding static routes for a network so it can see the internet
Post by: GiantJack on June 14, 2019, 10:42:51 pm
Hi !
I'm not sure to understand the rules you added...can you clarify or share a screenshot ?