Hi All,
I run a dedicated server. I have a slight issue in that my WAN gateway is not on the same subnet as my public IPs.
I used shellcmd in pfSense and understand that doesn't exist in OPNSense which is fine.
Can I simple add the following to my /etc/rc file? Is it persistent (i.e. upgrades & updates)?
route add -net GWIP -iface em0
route add default GWIP
Is there somewhere I should put it instead?
Thanks
Michael
If you enable secure shell and login to that as root you can do it from the shell, but doubt it would survive an update. You could also do it this way...
https://docs.opnsense.org/development/backend/autorun.html (https://docs.opnsense.org/development/backend/autorun.html)
I think you should also be able to do it by adding a route & gateway and setting it default, but don't quote me on that.
Quote from: michaelsage on February 02, 2018, 11:38:57 PM
Hi All,
I run a dedicated server. I have a slight issue in that my WAN gateway is not on the same subnet as my public IPs.
I used shellcmd in pfSense and understand that doesn't exist in OPNSense which is fine.
Can I simple add the following to my /etc/rc file? Is it persistent (i.e. upgrades & updates)?
route add -net GWIP -iface em0
route add default GWIP
Is there somewhere I should put it instead?
Thanks
Michael
Just setup a gateway as usual and tick "Far Gateway", then the check for the same subnet is disabled :)
Happy routing! 8)
Awesome. I'll give that a shot.
Thanks
Thanks that fixed it!
I was under the impression pfSense had a similar checkbox of a different name for a while now too, possibly predating our option. :)
Cheers,
Franco