Community discussions

MUM Europe 2020
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

WAN IP Alias, how to setup an internet connection with a second public IP

Sat May 28, 2016 9:29 pm

Hi,

My ISP provide me the following cenario for an fixed public IP (all IP are fictional):

WAN IP: 110.64.22.218
IP alias: 83.241.149.227
Subnet: 255.255.255.252
Gateway: 110.64.22.217
VLAN 20
DNS1: 62.28.40.173
DNS2: 62.28.116.41

If setup everything on my RB2011 but I can't acess the internet when connected to the router. I talked with the tech support from ISP and they sent me an example of configuration that works on a DrayTek router. I believe I need to set tup my MT with the IP alias when going out to the internet but I don't know how.

Here's the example from DrayTek that I need to do on the MT: http://just.draytek.com/index.php?optio ... 93&lang=en

How do I do that second part of Routing > Policy rule in the MT?
 
Sob
Forum Guru
Forum Guru
Posts: 5000
Joined: Mon Apr 20, 2009 9:11 pm

Re: WAN IP Alias, how to setup an internet connection with a second public IP

Sat May 28, 2016 9:34 pm

It would probably help if you showed us what exactly you set on your router.

Hint: /export hide-sensitive
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

Re: WAN IP Alias, how to setup an internet connection with a second public IP

Sat May 28, 2016 9:44 pm

What do you need from my current configuration?
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

Re: WAN IP Alias, how to setup an internet connection with a second public IP

Sat May 28, 2016 10:07 pm

Here's my configuration (Public IP's are fictional):

Ether1 is WAN
Ether2 is LAN
/interface vlan
add interface=ether1 name=vlan20 vlan-id=20
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp_pool1 ranges=192.168.0.1-192.168.0.253
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2 name=dhcp1
/ip address
add address=110.64.22.218/30 interface=vlan20 network=110.64.22.216
add address=192.168.0.254/24 interface=ether2 network=192.168.0.0
/ip dhcp-server network
add address=192.168.0.0/24 gateway=192.168.0.254
/ip dns
set servers=62.28.40.173,62.28.116.41
/ip firewall nat
add action=masquerade chain=srcnat out-interface=vlan20
/ip route
add distance=1 gateway=110.64.22.217
 
Sob
Forum Guru
Forum Guru
Posts: 5000
Joined: Mon Apr 20, 2009 9:11 pm

Re: WAN IP Alias, how to setup an internet connection with a second public IP

Sun May 29, 2016 12:03 am

Is this perhaps what you need?
/ip address
add address=83.241.149.227 interface=vlan20
/ip firewall nat
add action=src-nat chain=srcnat out-interface=vlan20 to-addresses=83.241.149.227
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

Re: WAN IP Alias, how to setup an internet connection with a second public IP

Sun May 29, 2016 4:16 am

I have to try it. Should I replace the src-nat masquarade with this NAT in the firewall or where will I put it?
 
Sob
Forum Guru
Forum Guru
Posts: 5000
Joined: Mon Apr 20, 2009 9:11 pm

Re: WAN IP Alias, how to setup an internet connection with a second public IP

Sun May 29, 2016 5:57 am

It's not really clear to me, if you can use both addresses or just this one. If only this one, then replace it. If both, then put this one before the original one and add some other conditions to it, like src-address=<only selected adddress from LAN that should use 83.241.149.227 when going out>.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

Re: WAN IP Alias, how to setup an internet connection with a second public IP

Tue May 31, 2016 1:54 am

I was talking about the NAT masquerade rule, but then I found out that I should replace it with the one you told me. on the VLAN20 interface I need to have both IP's, because if I only have the 110.64.22.218 I can't access the router or anything else in side the network.

Hoping I can help anyone with this kind of problem in the future, here's my final configuration, and thank you very much for your help.
/interface vlan
add interface=ether1 name=vlan20 vlan-id=20
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp_pool1 ranges=192.168.0.1-192.168.0.253
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2 name=dhcp1
/ip address
add address=110.64.22.218/30 interface=vlan20 network=110.64.22.216
add address=192.168.0.254/24 interface=ether2 network=192.168.0.0
/ip dhcp-server network
add address=192.168.0.0/24 gateway=192.168.0.254
/ip dns
set servers=62.28.40.173,62.28.116.41
/ip firewall nat
add action=src-nat chain=srcnat out-interface=vlan20 to-addresses=\
    83.241.149.227
add action=masquerade chain=srcnat disabled=yes out-interface=vlan20
/ip route
add distance=1 gateway=110.64.22.217
/system clock
set time-zone-name=Europe/Lisbon
/system leds
set 3 interface=wlan1
/system routerboard settings
set cpu-frequency=400MHz

Who is online

Users browsing this forum: dioeyandika, Google [Bot], martinclaro and 79 guests