Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
Configure the virtual ip for a pc
« previous
next »
Print
Pages: [
1
]
Author
Topic: Configure the virtual ip for a pc (Read 2780 times)
Silver77
Jr. Member
Posts: 50
Karma: 1
Configure the virtual ip for a pc
«
on:
October 08, 2021, 12:34:27 am »
How do i force a pc to go out with a virtual ip?
obviously the ip is part of the range at my disposal.
thanks
Logged
juere
Jr. Member
Posts: 91
Karma: 8
Re: Configure the virtual ip for a pc
«
Reply #1 on:
October 08, 2021, 01:02:32 am »
Let's assume you are using IPv4 and your desired virtual WAN IP is 42.1.2.3/32 and your PC is 192.168.1.1/24.
First create an IP Alias in Interfaces->Virtual IP's->Settings using WAN as interface and 82.1.2.3/3 as address.
The goto Firewall->NAT->Outbound and switch to Hybrid or Manual Mode whatever suits your needs better.
Create a new rule using WAN as interface, 192.168.1.1/32 as source, the previously created IP Alias 42.1.2.3/32 as Translation/Target and IPv4/any as protocol.
To get a more readable configuration I would first set up Aliases under Firewall->Aliases for 42.1.2.3/32 and 192.168.1.1/32 and use them in the NAT rule instead of IP adresses
«
Last Edit: October 08, 2021, 01:04:12 am by goodomens42
»
Logged
Silver77
Jr. Member
Posts: 50
Karma: 1
Re: Configure the virtual ip for a pc
«
Reply #2 on:
October 08, 2021, 07:58:39 am »
thanks a lot GoodOm. I understood that I had to use the outbond, but your description is accurate.
Admin can close the 3D
Thanks
Logged
Silver77
Jr. Member
Posts: 50
Karma: 1
Re: Configure the virtual ip for a pc
«
Reply #3 on:
October 12, 2021, 05:01:57 pm »
I use this type of configuration for a published PBX. I have a problem now, the calls arrive correctly and if I check my public ip matches the one assigned, but when I make a phone call I see that the connection is established with the previous ip and not with the new ip. I do not understand why
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
Configure the virtual ip for a pc