Question about routing of ip's
-
I have a setup I have never had before.
We have a pfsense setup for our network, but it isconnected to a network that belongs to another company.
Their explanation:
"We are routing public ip 190.190.160.25 to 10.30.30.7, which is the ip of your firewall. He gets this ip from our dhcp and also the gateway.
So you need to add the ip 190.190.160.25 to your pfsense.If you want to go to the internet with ip 190.190.160.25, you will have to look in the routingtable of your pfsense and forward it to 10.30.20.254 (which is the default gatewayaddress you get via our dhcp) and route it further to the internet.
In reverse we route the traffic for 190.190.160.25 to 10.30.30.7, so if your pfsense receives traffic on 10.30.30.7 he will look in his routingtable and knows where to forward traffic to.
In there it will say that 190.190.160.25 is locally on the pfsense and the packet can be received.
"Now, this is all way over my head.
Can anyone please help. Where do I need to do what and how?
-
@nick-loenders
You get a WAN IP from the provider (other company) by DHCP. So the WAN gateway is set automatically as well. Nothing to care here.Then you have to assign 190.190.160.25 to your WAN interface:
Firewall > Virtual IPs > Add.
Type: IP Alias
Interface: WAN
Address type: single
Address: 190.190.160.25Now you have to configure the outbound NAT: Firewall > NAT > Outbound.
Switch to manual mode and save it.
Then edit all NAT rules for the WAN and change the translation address to your virtual IP 190.190.160.25.Should be all you have to do. pfSense routes all upstream traffic to the default gateway it got from DHCP and set its source IP to 190.190.160.25.
-
@viragomann Thx, this worked perfect.
-
@nick-loenders that seems like a odd sort of config.. Do most users of this isp not get public address space - you paid for that extra I take it?
To be honest you would think isp that was going to nat their customers would use the cgnat space (100.64.0.0/10) vs rfc1918 space.
-
@johnpoz Hi, this is the only one.
Thing is this building is far from the road and the internet/network used to be from a university. So we are now helping a new company in the building and thus the network/internet is still coming from/hosted by the university. But we put a pfsense from us to make a new network for this new company. And the university routes our traffic besides their domainnetwork so we can have internet.So it is not really an ISP as normal.
-
@nick-loenders ah!!! thanks for the info that keeps my curiosity cat purring nicely ;)