2016-11-12 20:18:16 +00:00
|
|
|
# EdgeRouterPro-8 config example with v1.9.0
|
2016-11-12 19:49:17 +00:00
|
|
|
|
2016-11-12 19:46:52 +00:00
|
|
|
After a lot of searching and trying I [Phil/ALS7] finnaly got a working config
|
|
|
|
|
2016-11-12 20:18:16 +00:00
|
|
|
|
2016-11-12 19:46:52 +00:00
|
|
|
##Features
|
|
|
|
|
|
|
|
* IPv4/IPv6 Tunnel via OpenVPN
|
|
|
|
* dn42 DNS
|
|
|
|
|
|
|
|
##How-To
|
|
|
|
|
|
|
|
--> still work in Progress
|
|
|
|
|
|
|
|
1) you need to create all required fields in the registry --> look at howto/Getting startet page
|
|
|
|
|
|
|
|
The data i used are the following:
|
|
|
|
|
2016-11-12 20:01:56 +00:00
|
|
|
Own ASN: AS111111
|
|
|
|
Own IPv4: 172.AA.AA.64/27
|
|
|
|
Own IPv6: fdBB:BBBB:CCCC::/48
|
|
|
|
|
2016-11-12 20:31:27 +00:00
|
|
|
Peer Remote Address: X.X.X.X
|
|
|
|
Peer Remote Host: X.X.X.Y
|
|
|
|
Peer Port: 1194
|
|
|
|
Peer ASN: AS222222
|
|
|
|
Peer BGP Neighbour IPv4: Z.Z.Z.Z
|
2016-11-12 19:46:52 +00:00
|
|
|
|
|
|
|
2) get a peer --> ask nice @irc
|
|
|
|
|
2016-11-12 20:01:56 +00:00
|
|
|
3) You need following data from the peer
|
2016-11-12 19:46:52 +00:00
|
|
|
|
|
|
|
--tunnel options, secret key
|
2016-11-12 20:01:56 +00:00
|
|
|
--ASN from the peer
|
|
|
|
--ip's
|
2016-11-12 19:46:52 +00:00
|
|
|
|
|
|
|
...
|
|
|
|
|
2016-11-12 20:24:09 +00:00
|
|
|
###Create IPv4 OpenVPN Interface
|
2016-11-12 19:46:52 +00:00
|
|
|
|
|
|
|
start a ssh session to your router
|
|
|
|
|
|
|
|
copy vpn key to /config/auth/giveITaName -- Create folder if needed
|
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
configure
|
|
|
|
set interface openssh vtun0
|
|
|
|
set interfaces openvpn vtun0 mode site-to-site
|
|
|
|
set interfaces openvpn vtun0 local-port 1194
|
|
|
|
set interfaces openvpn vtun0 remote-port 1194
|
|
|
|
set interfaces openvpn vtun0 local-address 172.AA.AA.64
|
|
|
|
set interfaces openvpn vtun0 remote-address X.X.X.X
|
|
|
|
set interfaces openvpn vtun0 remote-host X.X.X.Y
|
|
|
|
set interfaces openvpn vtun0 shared-secret-key-file /config/auth/giveITaName
|
|
|
|
|
|
|
|
set interfaces openvpn vtun0 openvpn-option "--comp-lzo" //if your peer support compression
|
|
|
|
commit
|
|
|
|
save
|
|
|
|
exit
|
2016-11-12 19:46:52 +00:00
|
|
|
|
|
|
|
Now the ipv4 tunnel should be up&running
|
|
|
|
|
2016-11-12 20:01:56 +00:00
|
|
|
Check it with:
|
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
show interfaces openvpn
|
|
|
|
show interfaces openvpn detail
|
|
|
|
show openvpn status site-to-site
|
2016-11-12 20:01:56 +00:00
|
|
|
|
|
|
|
### Create IPv4 BGP Session
|
|
|
|
|
2016-11-12 20:24:09 +00:00
|
|
|
#### Open Firewall
|
|
|
|
|
|
|
|
* You need to open the firewall to local for the tunnel Interface on port 179/tcp
|
|
|
|
|
2016-11-12 20:18:16 +00:00
|
|
|
#### Configure the BGP Neighbor
|
|
|
|
|
|
|
|
* You must not use AS before the as numbers !!
|
|
|
|
|
2016-11-12 20:32:13 +00:00
|
|
|
.
|
2016-11-12 20:29:42 +00:00
|
|
|
configure
|
|
|
|
set protocols bgp 111111 neighbor Z.Z.Z.Z remote-as 222222
|
|
|
|
set protocols bgp 111111 neighbor Z.Z.Z.Z soft-reconfiguration inbound
|
|
|
|
set protocols bgp 111111 neighbor update-source 172.AA.AA.64
|
|
|
|
commit
|
|
|
|
save
|
2016-11-12 20:18:16 +00:00
|
|
|
|
|
|
|
When commit this configuration you should be able to see a BGP neighbor session start and come up. You can check this with:
|
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
show ip bgp summary
|
2016-11-12 20:18:16 +00:00
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
#### Set route to blackhole
|
2016-11-12 20:01:56 +00:00
|
|
|
|
2016-11-12 20:24:09 +00:00
|
|
|
* so bgp can announce the route
|
2016-11-12 20:01:56 +00:00
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
set protocols static route 172.AA.AA.64/27 blackhole
|
|
|
|
commit
|
|
|
|
save
|
2016-11-12 20:24:09 +00:00
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
#### Announce prefix to BGP
|
2016-11-12 19:46:52 +00:00
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
set protocols bgp 111111 network 172.A.A.64/27
|
|
|
|
commit
|
|
|
|
save
|
|
|
|
exit
|
2016-11-12 19:46:52 +00:00
|
|
|
|
2016-11-12 20:29:42 +00:00
|
|
|
You should now be able to see networks being advertised via
|
|
|
|
|
|
|
|
show ip bgp neighbors Z.Z.Z.Z advertised-routes
|
2016-11-12 19:46:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|