OPNsense Forum

English Forums => Virtual private networks => Topic started by: werom-IT on October 14, 2022, 10:29:17 PM

Title: IP-Alias for printer ??
Post by: werom-IT on October 14, 2022, 10:29:17 PM
Hi!

Network exists of 2 sites: 192.168.1.0/24 + 192.168.2.0/24
The company bought a new location and needs to move.

All clients use a printer at 192.168.1.10

For the move, half of all clients are moving, half of it staying in the old location. The printer moves to the new location.

The problem: I cant use the 192.168.1.10 IP-Adress within the 192.168.10.0/24 network because it has a site2site vpn to 192.168.1.0/24. so virtual-ip doesnt work cause the subnet goes via vpn to the old location.

The thing is, we dont want to change printer settings at each client (>100)

My idea would be that and each location, I add something like a route/ip-alias for the printer and change the printers IP so it will be reachable at the new location: 192.168.10.10
old location: if a client within the old location connects to 192.168.1.10, it should route via vpn to new location to 192.168.10.10 - is that possible?
new location: if a client within the new location connects to 192.168.1.10, it should not route via vpn to old location but redirect to 192.168.10.10.

Is that possible anyways? Or any better solution?
Title: Re: IP-Alias for printer ??
Post by: werom-IT on October 15, 2022, 12:11:26 PM
is this the correct forum-category for this?
Title: Re: IP-Alias for printer ??
Post by: cookiemonster on October 15, 2022, 11:07:08 PM
It probably is but imho setting such a complicated use of network routes and ip spoofing for a single printer is not the way to address the problem.
To me, it's either update all the clients, or better still, move to something more modern like a print server with a name. Make it the last time the company has this type of problem, with every client connecting to it by name, regardless of ip address.
Title: Re: IP-Alias for printer ??
Post by: werom-IT on October 16, 2022, 08:48:24 AM
thanks for your answer.
Is an option of course.

Besides my problem, it was also more like a questions, if thats possible anyway?
so my solution is called ip spoofing?
Title: Re: IP-Alias for printer ??
Post by: Patrick M. Hausen on October 16, 2022, 08:50:28 AM
Even without the print server - ever heard of DNS? Address the printer by name instead of IP address.
Title: Re: IP-Alias for printer ??
Post by: werom-IT on October 16, 2022, 08:57:36 AM
this topic was about to see if there is a technical solution for ip-alias in the way described above.
I would need a DNS-System for IP-addresses but this doesnt seem to exist.
192.168.1.10 -> 192.168.10.10 but I guess DNS doesnt get called when using an ip-address, so dns-system wouldnt help for ip-addresses.

and I dont see a way to implement my thoughts in opnsense?
Add a route, doesnt work, cause it defines network-ways, not ip-based-ways
Add NAT-rule doesnt work, at least it didnt get it to work
Add Firewall-Rule doesnt work, only if for allowing or denying.

Virtual-IPs are creating a new network segment but not redirect ip-addresses.

Besides my printer-thing, is there a network-way to do that?
Title: Re: IP-Alias for printer ??
Post by: Patrick M. Hausen on October 16, 2022, 11:31:24 AM
Why are the systems using the printer referring to the printer by IP address instead of a DNS name like printerxy.corporatedomain.lan? In the latter case you just change the DNS entry when the printer moves and all systems find it at the new address.
Title: Re: IP-Alias for printer ??
Post by: werom-IT on October 16, 2022, 10:32:51 PM
Hi

The why shouldnt matter but in this case, but the old administrators did it that way. As far as Ive heard, were they not able to set up a dns correctly and configure it.

This has changed, though, I was wondering if that is possible anyway.

The only way that I could imagine, would be that each request a client sends within a network to another client within the same network, it goes to the router and then to the specific ip-address.
but it doesnt. so the router has no power over redirecting a client, thats the real problem in this case.
Tried tracert to another client and it doesnt go through router. everything else not on the same subnet goes to the router and forwarded to another network.

Alright, ip-alias within the same network is networkly/technically not possible.

Topic closed, answer given.
Thanks