Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
15.1 Legacy Series
»
[SOLVED] Route to interface
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Route to interface (Read 52177 times)
benmz
Newbie
Posts: 3
Karma: 0
[SOLVED] Route to interface
«
on:
July 01, 2015, 03:33:00 pm »
Hi, first of all thanks a lot for your product... I really love to use a decent interface based on a decent firewall !!
One suggestion I have is to support interface based route.
I was adding route like:
route add -inet 195.154.XX.XX/32 -link -iface em0
before 15.1.12 with /etc/hostname.em0 and /etc/rc.conf, but since last upgrade I'm not able anymore to set them automatically on startup...
How could I implement this option ? I don't even know where to start looking in the code. I'm a
robust
PHP dev
but I have never played with phalcon...
Thanks anyway for your efforts to bring back pleasant firewalls !!
«
Last Edit: July 01, 2015, 03:46:57 pm by franco
»
Logged
franco
Administrator
Hero Member
Posts: 17707
Karma: 1618
Re: Route to interface
«
Reply #1 on:
July 01, 2015, 03:36:54 pm »
Hi there, thanks, I think you may be looking for this fix which will also be in tomorrow's 15.7:
https://github.com/opnsense/core/commit/cc88a71d78524006f1596a7496881ede58869d73
Let me know whether that helps or not.
Logged
benmz
Newbie
Posts: 3
Karma: 0
Re: Route to interface
«
Reply #2 on:
July 01, 2015, 03:45:13 pm »
Yep! this seems to do the trick for the CLI part...
Anyway I'd be glad to help on GUI dev if needed, but I'm a little bit stuck doesn't knowing where to start for this...
But topic could be set as 'SOLVED'
Thanks a lot for your quick answer, and sorry for my bad english...
Logged
franco
Administrator
Hero Member
Posts: 17707
Karma: 1618
Re: [SOLVED] Route to interface
«
Reply #3 on:
July 01, 2015, 03:50:42 pm »
Taken care of. And no worries about the English.
We'd love some help with the system, here are two pointers...
How to start hacking on the GUI:
http://lastsummer.de/development-workflow-in-opnsense/
Known issues that need help from new contributors:
https://github.com/opnsense/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22
If you have a GitHub account feel free to send pull requests, that's the easiest way to bring code in and to review/discuss.
If you need more help, the IRC channel on FreeNode is #OPNsense
«
Last Edit: July 01, 2015, 03:52:34 pm by franco
»
Logged
franco
Administrator
Hero Member
Posts: 17707
Karma: 1618
Re: [SOLVED] Route to interface
«
Reply #4 on:
July 01, 2015, 03:52:21 pm »
PS: Why does "System: Routing: Routes" not do the job for your use case?
Logged
benmz
Newbie
Posts: 3
Karma: 0
Re: [SOLVED] Route to interface
«
Reply #5 on:
July 01, 2015, 04:00:49 pm »
Because the routing form only deals with destination IP route, but sometimes (specially with ppp or specific datacenters like here in France with Dedibox) your gateway is not an IP but an interface (set with the -link option in CLI command)
So in my case I got a /32 IP address on em0 a completely different /32 IP as a gateway which I need to set directly to the interface, and a default gateway pointing to that last gateway...
for exemple:
iface ifconfig em0 inet XX.XX.XX.XXX netmask 255.255.255.255
route add -inet 195.154.YYY.1/32 -link -iface em0
route add default 195.154.YYY.1
Does that answer your question ? Did I miss something in the GUI ?
Logged
franco
Administrator
Hero Member
Posts: 17707
Karma: 1618
Re: [SOLVED] Route to interface
«
Reply #6 on:
July 01, 2015, 04:08:57 pm »
Ah, ok, seeing it now. That's worth putting into the GUI for sure.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
15.1 Legacy Series
»
[SOLVED] Route to interface