need help with OpenVPN route table setup

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
lzp729
DD-WRT Novice


Joined: 14 Feb 2012
Posts: 3

PostPosted: Fri Oct 17, 2014 2:59    Post subject: need help with OpenVPN route table setup Reply with quote
Hi

I'd like to use my NetGear WNDR3700v2 running DD-WRT as DHCP,DNS and gateway for my internal network, and another wired dial-up router as internet access for WNDR3700v2.
I disabled WNDR3700v2 WAN function, change WNDR3700v2 to route mode, and set its ip to 192.168.1.2, gateway 192.168.1.1(the wired dial-up router), PC clients gateway set to 192.168.1.2

here is what I got
before OpenVPN
Code:
>ifconfig
ath0      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:640 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:144270 (140.8 KiB)
ath1      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:65 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:626 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:143114 (139.7 KiB)
br0       Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27398 errors:0 dropped:98 overruns:0 frame:0
          TX packets:26731 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7498922 (7.1 MiB)  TX bytes:13490553 (12.8 MiB)
br0:0     Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
eth0      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:655 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:133714 (130.5 KiB)
          Interrupt:4
eth1      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:64 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27406 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26731 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7882974 (7.5 MiB)  TX bytes:13490553 (12.8 MiB)
          Interrupt:5
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:689 (689.0 B)  TX bytes:689 (689.0 B)


Code:
>route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0


after OpenVPN connected
Code:
>ifconfig
ath0      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:885 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:208126 (203.2 KiB)
ath1      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:65 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:871 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:206970 (202.1 KiB)
br0       Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39236 errors:0 dropped:139 overruns:0 frame:0
          TX packets:43367 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8799987 (8.3 MiB)  TX bytes:25934991 (24.7 MiB)
br0:0     Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
eth0      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:63 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:903 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:193340 (188.8 KiB)
          Interrupt:4
eth1      Link encap:Ethernet  HWaddr A0:21:B7:9B:4B:64 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39247 errors:0 dropped:0 overruns:0 frame:0
          TX packets:43367 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9349951 (8.9 MiB)  TX bytes:25934991 (24.7 MiB)
          Interrupt:5
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:184 errors:0 dropped:0 overruns:0 frame:0
          TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:18037 (17.6 KiB)  TX bytes:18037 (17.6 KiB)
tun1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:198.18.96.207  P-t-P:198.18.96.207  Mask:255.255.240.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:410 errors:0 dropped:0 overruns:0 frame:0
          TX packets:677 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:271906 (265.5 KiB)  TX bytes:89299 (87.2 KiB)


Code:
>route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         198.18.96.1     128.0.0.0       UG    0      0        0 tun1
default         192.168.1.1     0.0.0.0         UG    0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
128.0.0.0       198.18.96.1     128.0.0.0       UG    0      0        0 tun1
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
198.18.96.0     *               255.255.240.0   U     0      0        0 tun1



Then, all my internal traffic goes to OpenVPN interface, that's not what I expected.
I would like have all traffic default goes to 192.168.1.1, and if only client need to access specified IP(like 198.18.99.1) goes to 198.18.96.1.

I tried to run command "route del default", but this command remove the default br0 route, and default tun1 still exists.

Please help on this routing setup, appreciate.
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum