I have a device with a static 192.168.0.100/24 ip address. It comes that way out of the box. It is on the lan with a 192.168.47.0/24 config.
Is there a way I can access that device without changing my ip on my pc to something in the 192.168.0 range?
Thanks!
JB172
January 28, 2017, 8:19pm
2
Add a second ip to your pc
That’s not what I am looking for. I need a solution on the router end.
in the router add the ip 192.168.0.101/24 (if is free) on the bridge or interface where the device 192.168.0.100/24 can be reachable,
on firewall/NAT add src-nat src-add 192.168.0.0/24 dst-add 192.168.47.0/24 action masquerade
on firewall/NAT add src-nat src-add 192.168.47.0/24 dst-add 192.168.0.0/24 action masquerade
warning: the device 192.168.0.100/24 must have 192.168.0.101/24 as gateway!!!
if you can not change his gateway put also this:
and only if is needed: add src-nat dst-add 192.168.0.100 action src-add to address 192.168.0.101
There are not 2 routers…
There is one router with the lan set to 192.168.47.0/24.
The device just has a static ip of 192.168.0.100. It did not get it’s address from a router.
Does that make a difference?
tabate47:
There are not 2 routers…
There is one router with the lan set to 192.168.47.0/24.
The device just has a static ip of 192.168.0.100. It did not get it’s address from a router.
Does that make a difference?
I fix the post, re-read it
I could swear I have done this before by using static routing and the firewall.
Is that possible or am I dreaming?
…is another way… but can be more complicated…
can you explain the other way too? I know I’ve done it but I can’t remember how. It involved a static route and some firewall rules.
where does this go: and only if is needed: add src-nat dst-add 192.168.0.100 action src-add to address 192.168.0.101
Thanks
tabate47:
can you explain the other way too? I know I’ve done it but I can’t remember how. It involved a static route and some firewall rules.
where does this go: and only if is needed: add src-nat dst-add 192.168.0.100 action src-add to address 192.168.0.101
Thanks
on firewall/nat with the other 2
the other way without IP address on router and the 2 NAT rule are:
add route for 192.168.0.0/24 network, put inside the device the gateway 192.168.0.101, but on this way the device do not to go over internet and you must add some firewall rules to do that and use the proxy-arp feature as last measure.
You are very smart! You helped me figure it out. Thank you.
We don’t need the mangle rules. The key is adding the address to the address list. It automatically adds the static route.
You also have to add in the filter rules an action accept, fwd chain, dst address 192.168.0.0/24, out interface to the lan.
I’m very happy! Thank you very much.