Routing to client with wrong default gateway
-
With pFsense I'm running into a problem to connect to a internal device witch hase the wrong default gateway (I think).
On a remote connection there is a pFsense 2.5.2 setup and running perfect. I can connect to this useing openvpn. On this netwerk I want to connect a new Linksys E900 so I can program this from my normal location.
The default ip adress of the E900 is 192.168.1.1 and I can ping this from the firewall (connected to one of the lan ports of the E900). When I connect using openvpn it's not possible to ping the E900 (192.168.1.1) from my system. I can ping all other devices (192.168.1.x/24), but not the E900.
What could be a solution to connect (need HTTP to program the E900) to the E900 device and program the device ? Should I use NAT or a proxy ?
-
Just an idea ....
I have seen on old WRT54G devices , that they come with a "Only allow mgmt from lan" tickbox option.
Could be that the device is setup to reject connections from any ip outside the "lan range"
/Bingo
-
@bingo600 This is an option in the E900 and works perfect. For some reason on the E900 router is back to factory default. Thats why I first need to reprogram the device and then use this feature again.
-
@boumacor said in Routing to client with wrong default gateway:
a new Linksys E900
Not sure would call it "new" ;) n300 wifi router with 10/100 ports.. isn't what I would call "new" anything hehehe
Can almost promise you if trying to use as AP, where one of its lan ports is connected to your network it has NO gateway. So no you wouldn't be able to talk to it from anything other than what the lan network is (192.168.1/24)
Simple solution if you want to be able to get to its gui from openvpn client, is just source nat your traffic.. On pfsense outbound nat create a nat using the lan interface coming from your openvpn tunnel network and talking to this e900 ip to use the lan IP.. This way the e900 will think your just on the lan network since traffic will come from pfsense lan IP vs your openvpn clients IP.
example
My lan network is 192.168.9/24 - pfsense IP is 192.168.9.253.. My tunnel network for openvpn clients is the 10.0.200/24 network... Say my e900 lan IP was 192.168.9.42
With this outbound nat created a vpn client trying to talk to 192.168.9.42 would look like its 192.168.9.253 (pfsense lan IP)
Now a better solution would be to setup gateway on this e900 lan setup. But most soho wifi routers do not allow that with native firmware. If you could run ddwrt or openwrt on the thing - then yeah you could do that.
-
@johnpoz Thanks for your help, I'll test it and let you know.
-
@johnpoz said in Routing to client with wrong default gateway:
Strange thing, on my lab it works like a charm, but in "the wild" it doesn't. Setup like you shown.
My OpenVPN is 192.168.99.0/24 and the destination is 192.168.1.1. This I'm sure because I can see IGMP traffic.
My lan is devided in a couple of vlans so the REPROGRAM vlan is only connected to the lan port of the Linksys. The IP adress if the pfsense interface on the REPROGRAM vlan is 172.20.1.111.
Any idea's ???
-
@boumacor said in Routing to client with wrong default gateway:
The IP adress if the pfsense interface on the REPROGRAM vlan is 172.20.1.111.
huh? How would 172.20.1.111 talk to 192.168.1.1??
How exactly do you have this e900 connected - directly to pfsense interface? Or through a switch? The e900 is not going to understand a vlan tag..
-
My bad, the pfsense interface is 192.168.1.111/24. The E900 is connected to a port on the switch with untagged traffic.
But I've just had a nice cup of coffey and found the problem. Used the wrong OpenVPN subnet. Should be 172.20.99.0 and used 192.168.99.0 in the rules.
Just made the correction and now it just works :(
Not enough coffey, always a problem :)
Thanks for all your help
-
@boumacor your welcome - glad you got it sorted. Yeah enough coffee does help ;)
-
@johnpoz said in Routing to client with wrong default gateway:
@boumacor your welcome - glad you got it sorted. Yeah enough coffee does help ;)
Coffee and pizza :)