• April 25, 2024, 09:46:54 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: DFL800 Wan1 RDP inbound and Wan2 http in/out  (Read 7601 times)

adelme

  • Level 1 Member
  • *
  • Posts: 11
DFL800 Wan1 RDP inbound and Wan2 http in/out
« on: July 28, 2011, 10:18:41 AM »

I don't understand well the PBR .....

I have 2 internet access, public IP on WAN1 and other router on WAN2.
Server (rdp and http) is on LAN
I want RPD inbount/outbound ONLY on WAN1
I wand other services (http, ftp …. service group in/out) on WAN2

WAN1 (arp publish, nat, sat, ip rule) is okay, I can RDP'in to my server

Here is resumed the current config :

Interfaces
WAN1 : wan1_ip, wan1_net, wan1_gw - auto route creation disabled (enabled first time to check the WAN1 rdp alone)
WAN2 : idem (of course with wan2 ips !)

IP rules :
WAN1toLAN :
SAT : wan1/allnets - core/wan1ip (rdp protocol)
ALLOW : wan1/allnets - core/wan1ip (rdp protocol)
(note this config works well with only wan1)

LANtoWAN1 :
NAT : lan/lannet – wan1/allnet (rdp only)

WAN2toLAN
SAT : wan2/allnets - core/wan2ip (other protocols)
ALLOW : wan2/allnets - core/wan1ip (other protocol)

LANtoWAN2 :
NAT : lan/lannet – wan2/allnet (other protocols)


But I don't understand how to configure the other route and the PBR (necessary to separate rdp traffic and other traffic) .... and how to set the metrics for the interfaces and routes ??

Thank’s for your help !
Gilles
Logged

danilovav

  • Level 4 Member
  • ****
  • Posts: 424
  • Alexandr Danilov
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #1 on: July 29, 2011, 01:56:02 PM »

First, fix your IP rules
In WAN2toLAN, allow rule, destination network is wan2ip

Next, PBR
You need
1) Routing > Routing tables
Add table alt_wan1
Add into this table route wan1 all-nets (wan1_gw) 100
2) Routing > Routing rules
Add rule
wan1/all-nets any/all-nets, forward main, return alt_wan1
3) Do the sane for wan2
Logged
BR, Alexandr Danilov

adelme

  • Level 1 Member
  • *
  • Posts: 11
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #2 on: August 01, 2011, 09:48:29 AM »

Hi Danilovav !

Yes of course, keyboard error on WAN2toLAN rule ...

But it does'nt works.... I think the problem is in the routing tables :

With only the main following routing table :
route wan1 - wan1net 100
route wan1 - all-nets - wan1gw 90
route wan2 - wan2net 100
route wan2 - all-nets - wan2gw 80

all traffic is okay through wan2 (low metric on wan2)
if I switch the 80/90 metrics between wan1 and wan2 route, all traffic is okay through wan1

So I think the IP rules and interfaces  are okay.

But when I remove the 2 routes (wan1 all-nets wan1gw) and (wan2 all-nets wan2gw) from the main, and I add the 2 alternate routing tables and the 2 routing rules there is no more traffic through wan1 nor wan2

Any idea?

ps : alt_wan1 and alt_wan2 should be "default" or "only" ?

I should have :
inbound AND outbound RDP on WAN1
inbound and outbound HTTP/SMTP... on WAN2
no failover
« Last Edit: August 01, 2011, 10:23:14 AM by adelme »
Logged

danilovav

  • Level 4 Member
  • ****
  • Posts: 424
  • Alexandr Danilov
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #3 on: August 02, 2011, 01:47:54 PM »

You don't need to remove default routes from main! Keep it and add for fisrt (with least metric) monitoring by ICMP
Alternative routing tables should be "only" and will be used only to pass inbound traffic, not outbound
Logged
BR, Alexandr Danilov

adelme

  • Level 1 Member
  • *
  • Posts: 11
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #4 on: August 03, 2011, 08:15:06 AM »

Hi Danilo !
Thank you for the default routes ....

finaly, after many config, here is the good configuration I currently use and wich seems to be ok (again, wan1 is exclusively reseved for rdp) :
- ONLY rdp in and out pass thru wan1
- ONLY http and smtp can go from wan2 to my exchange server on lan
- all other outgoing traffic pass from lan to wan2

Any remark ? (I think the drop rdp rule is unnecessary)


Logged

danilovav

  • Level 4 Member
  • ****
  • Posts: 424
  • Alexandr Danilov
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #5 on: August 03, 2011, 12:14:58 PM »

If you not need to use favorier (use another interface for outbound traffic in case of first down), you can remove route wan2/all-nets from main routing table

From other side, you can keep default route in main (in this case, remove wan1/all-nets) and make alt_wan1 routing table. In this case you will not need wan2_rule_out PBR
Logged
BR, Alexandr Danilov

scrubsguy

  • Level 2 Member
  • **
  • Posts: 79
  • Blame it on the guy who can't speak english
    • NTCS
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #6 on: August 03, 2011, 10:16:18 PM »

won't that effect the routing?
Logged
skype me! pietta09

danilovav

  • Level 4 Member
  • ****
  • Posts: 424
  • Alexandr Danilov
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #7 on: August 04, 2011, 07:22:43 PM »

It's incorrect to have two default routes in main routing table with the same metric
Logged
BR, Alexandr Danilov

scrubsguy

  • Level 2 Member
  • **
  • Posts: 79
  • Blame it on the guy who can't speak english
    • NTCS
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #8 on: August 07, 2011, 11:00:36 PM »

so yes?
Logged
skype me! pietta09

lingnau

  • Level 2 Member
  • **
  • Posts: 53
    • www.lingnau.com.br
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #9 on: August 29, 2011, 05:04:57 AM »

I'm having a similar situation and described the problem in this thread:

http://forums.dlink.com/index.php?topic=37456.0

After reading this thread I've created a route for my WAN2 interface and a Routing rule but that didn't do the trick. Any tips?


Edit: Reading trough old topics i've found the solution to my problem:

http://forums.dlink.com/index.php?topic=15614.0
« Last Edit: August 29, 2011, 07:18:40 AM by lingnau »
Logged

adelme

  • Level 1 Member
  • *
  • Posts: 11
Re: DFL800 Wan1 RDP inbound and Wan2 http in/out
« Reply #10 on: September 14, 2011, 02:49:15 PM »

I was on holidays ....
But I'm back and I can confirm that my config works very well, with the last modification of Alexander. (removing one of the default routes)
Logged