找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1925|回复: 3

请教一种关于virtual**使用的配置方法

[复制链接]
想在openwrt 上配置一个PPTP客户端,然后分开两个网段 LAN和WIFI,希望达到的效果是lan可以通过virtual**连接virtual**服务器,wifi直接通过wan口上网,不走virtual**,如下图


当前network配置


config interface 'wan'
        option ifname 'eth1'
        option proto 'static'
        option ipaddr '192.168.9.10'
        option netmask '255.255.255.0'



config interface 'virtual**'                        
        option proto 'pptp'                    
        option server '192.168.9.1'      
        option username 'user'            
        option password '123456'      


config interface 'lan'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'                 

config interface 'wifi'                  
        option proto 'static'            
        option ifname 'wlan0'            
        option ipaddr '192.168.2.1'      
        option netmask '255.255.255.0'
lan和wifi分别配置了dhcp, wireless 的 network  也指向了 wifi.


防火墙配置
config zone                    
        option name 'lan'      
        option input 'ACCEPT'  
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option network 'lan'   
config zone                    
        option name 'wifi'     
        option input 'ACCEPT'  
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option network 'wifi'                                 
config zone                    
        option name 'wan'      
        option input 'REJECT'  
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'        
        option mtu_fix '1'     
        option network 'wan'
config zone                     
        option name 'virtual**'        
        option input 'REJECT'   
        option output 'ACCEPT'   
        option forward 'REJECT'  
        option masq '1'         
        option mtu_fix '1'      
        option network 'virtual**'   

config forwarding               
        option src 'lan'         
        option dest 'virtual**'        
config forwarding               
        option src 'wifi'        
        option dest 'wan'


ifconfig

eth0      Link encap:Ethernet  HWaddr 28:22:46:00:02:6E  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2a22:46ff:fe00:26e/64 Scopeink
          inet6 addr: fd6f:9ff4:d59c::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:280179 errors:0 dropped:0 overruns:1 frame:0
          TX packets:324346 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:44481255 (42.4 MiB)  TX bytes:308350884 (294.0 MiB)
          Interrupt:5

eth1      Link encap:Ethernet  HWaddr 28:22:46:00:02:6F  
          inet addr:192.168.9.10  Bcast:192.168.9.255  Mask:255.255.255.0
          inet6 addr: fe80::2a22:46ff:fe00:26f/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:711670 errors:0 dropped:0 overruns:0 frame:0
          TX packets:432143 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:347392622 (331.2 MiB)  TX bytes:69838505 (66.6 MiB)
          Interrupt:4

pptp-virtual**  Link encapoint-to-Point Protocol  
          inet addr:172.10.10.2  P-t-P:172.10.10.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1482  Metric:1
          RX packets:23883 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19822 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:22045560 (21.0 MiB)  TX bytes:2811134 (2.6 MiB)

wlan0     Link encap:Ethernet  HWaddr 28:22:46:00:02:6E  
          inet addr:192.168.2.1  Bcast:192.168.6.255  Mask:255.255.255.0
          inet6 addr: fe80::2a22:46ff:fe00:26e/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:900 (900.0 B)



现在的情况是,lan口的设备可以走virtual**,但是wifi设备也在走virtual**,两个网段 traceroute 第二跳都是virtual**网关。。。
请问可以设置 让wifi直接去走wan口,不经过virtual**吗???




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
 楼主| | 显示全部楼层
route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         172.16.1.1      0.0.0.0         UG    0      0        0 pptp-virtual**
172.10.10.1      *               255.255.255.255 UH    0      0        0 pptp-virtual**
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
192.168.2.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.9.0     *               255.255.255.0   U     0      0        0 eth1
回复

使用道具 举报

我猜想是不是路由表你没有添加或者改变,对路由表请自行百度。
回复

使用道具 举报

对不起,刚刚注意到2楼也是你。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-5-17 04:54

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表