Is it possible to change the source IP of a packet?

Hi there,

I have an issue with my dynamic dns update client. I have multiple external connections each with a unique dynamic dns name.

The problem is that one of the external accounts only has reliable access to IP’s inside the border of my country. But I require this connection to update with a dynamic dns server outside of the country.

Is it possible to use one of the connections which have full external access, but to change its source address to the IP of the connection which has limited access? A sort of masquerade if you like?

The packets that I would like to manipulate always originate from 192.168.1.6 with destination 207.67.0.0/16, it should display the ip of pppoe-local but by using pppoe-international…

Is this possible?

to change source address, use /ip firewall nat add chain=srcnat action=src-nat to-addresses=place_here

Hi Chupaka,

That seems simple enough, is there a way that I can use the interface in the to-addresses=place_here holder?

For example can I say to-addresses=pppoe_local ? The pppoe_local account has a dynamic address.

Thanks!

no, to-address should be specified explicitly. you can set up interface as in-interface.

Hi Janisk,

Can you give me an example of the string that I would use to accomplish what Chupaka said using the in-interface?

It’s a shame that I can’t use the interface as the to-address.

you should use scripting to get current address of pppoe and change your NAT rule accordingly