Community discussions

MikroTik App
 
monkeybike
newbie
Topic Author
Posts: 36
Joined: Tue May 12, 2015 6:39 pm

Set Outbound IP

Tue Jan 26, 2016 6:46 pm

Hi,

Hi Experts,

I have a PPoE connection that on dial up gets a DHCP address from ISP. But on that line I have a Static IP range.

How do make my connection show one of my static IP range when I go out. Rather than the DHCP one assigned via ISP. On another make of firewall I use, I do it by on the policy. Say http.out I set the source IP to one of my statics. Cant see how I do this in WinBox

Regards

Richard
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Set Outbound IP

Tue Jan 26, 2016 7:15 pm

Are you sure it's DHCP? PPPoE assigns IP addresses as part of the PPP negotiation (IPCP if anyone's interested) and most ISPs would just assign your public IP range directly on the PPP session and not use a dedicated WAN IP separate from the "lan" range - but perhaps your ISP has a reason for using a WAN address.

(I assume you're using ether1 as the wan interface)

Do you have IP DHCP-Client configured to run on interface ether1? If you're also getting IP via pppoe then this shouldn't normally be necessary...

Anyway, the default route of your system could be configured with "preferred source = x.x.x.x" where x.x.x.x is the IP from your range that you want the router to use for itself. Un-check "Add Default Route" on the pppoe-out interface in the "Dial Out" tab and statically configure a default gateway in IP Routes:
/ip route add dst=0.0.0.0/0 gateway=pppoe1-out pref-src=x.x.x.x
(use the actual name of your pppoe interface, of course)

This should do what you want. If this still doesn't fix it, then you can change the NAT rule to use src-nat as the action instead of masquerade, and you can specify whatever IP you want as the to-address for src-nat.

Who is online

Users browsing this forum: MetalKalic, mkx, wiktorbgu and 17 guests