PPPOE拨号之七:华为防火墙 USG PPPoE拨号配置【针对Client+NAT工作常用方式与服务器】

掌握目标

1、在华为USG上PPPOE服务器的配置
2、在华为USG上PPPOE 客户端的配置(工作上常用)
3、配置NAT(上网使用)
4、默认路由+策略配置

拓扑

pppoe

1、在华为USG上PPPOE服务器的配置

(1)用户配置与地址池
[USG-Server]aaa
[USG-Server-aaa]local-user test password cipher ccieh3c.com
[USG-Server-aaa]local-user test service-type ppp
[USG-Server-aaa]ip pool 1 123.1.1.2 123.1.1.254

(2)虚拟模板接口
[USG-Server]interface g0/0/0
[USG-Server-GigabitEthernet0/0/0]ip address 123.1.1.1 24

[USG-Server]interface Virtual-Template 1
[USG-Server-Virtual-Template1]ppp authentication-mode chap
[USG-Server-Virtual-Template1]ip address unnumbered interface g0/0/0
[USG-Server-Virtual-Template1]remote address pool 1

[USG-Server]interface g0/0/0
[USG-Server-GigabitEthernet0/0/0]USG-Server bind virtual-template 1

说明:G0/0/0接口已经加入对应的Zone了,否则需要加入后才能正常工作。

2、在华为USG上PPPOE 客户端的配置(工作上常用)

(1)拨号规则定义
[USG-Client]dialer-rule 1 ip permit

(2)拨号接口配置
[USG-Client]interface Dialer 1
[USG-Client-Dialer1]dialer user test (用该帐号拨号)
[USG-Client-Dialer1]dialer-group 1 (对应规则1)
[USG-Client-Dialer1]dialer bundle 1 (后续bundle调用在接口)
[USG-Client-Dialer1]ip address ppp-negotiate
[USG-Client-Dialer1]ppp chap user test
[USG-Client-Dialer1]ppp chap password cipher ccieh3c.com

(3)物理接口调用
[USG-Client]interface GigabitEthernet 0/0/0
[USG-Client-GigabitEthernet0/0/0]USG-Client dial-bundle-number 1

(4)注意事项
有的版本需要把拨号接口加入到对应的zone,有的版本则不需要,所以如果看到拨号一直没有成功,可以把拨号接口加入到Zone。
[USG-Client]firewall zone untrust
[USG-Client-zone-untrust]add interface Dialer 1

3、配置NAT(上网使用)

[USG-Client]nat-policy interzone trust untrust outbound
[USG-Client-nat-policy-interzone-trust-untrust-outbound]policy 0
[USG-Client-nat-policy-interzone-trust-untrust-outbound-0]policy source 192.168.1.0 mask 24
[USG-Client-nat-policy-interzone-trust-untrust-outbound-0]action source-nat
[USG-Client-nat-policy-interzone-trust-untrust-outbound-0]easy-ip Dialer 1
说明:这里NAT规定了从192.168.1.0/24网段来的流量进行源NAT转换,使用的是拨号接口的公网地址。

4、默认路由+策略配置

默认路由是为了访问internet用的,如果内网跨网段了,也需要写回程路由,而策略的话,对于型号不一样,默认策略也不一样,有的是全部允许放行了,有得没有默认策略,都是deny的,需要自己放行。
[USG-Client]ip route-static 0.0.0.0 0 Dialer 1

[USG-Client]policy interzone trust untrust outbound
[USG-Client-policy-interzone-trust-untrust-outbound]policy 0
[USG-Client-policy-interzone-trust-untrust-outbound-0]action permit
说明:这里是允许了全部的内网网段能主动访问外网。

容易遇到的问题

(1)一些网站或者应用打开慢以及打不开的情况,这个很有可能是MTU与TCP MSS导致,可以多尝试几个值来达到比较理想的效果。
[USG-Dialer0]mtu 1400
[USG]firewall tcp-mss 1200
(2)一些小企业或者SOHO级别的网络可能申请的是民用的拨号线路,那这个时候有可能自己用电脑先拨入测试效果,然后发现在路由器上面怎么都拨入不了,那很有可能是运营商那边绑定了,需要打电话过去松绑。
(3)ADSL有可能采用私网地址分配,所以在申请的时候需要考虑是否需要做映射服务出去或者一些VPN拨入,在申请的时候需要跟对方说明清楚。(包括80端口是否可以用)

如果大家有任何疑问或者文中有错误跟疏忽的地方,欢迎大家留言指出,博主看到后会第一时间修改,谢谢大家的支持,更多技术文章尽在网络之路Blog(其他平台同名),版权归网络之路Blog所有,原创不易,侵权必究,觉得有帮助的,关注、转发、点赞支持下!~。

  • 3
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值