年年有"余"

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2622|回复: 0

[OpenWRT] OpenWRT常用操作及命令(更新中……)

[复制链接]
  • TA的每日心情
    奋斗
    2022-12-13 21:26
  • 签到天数: 371 天

    [LV.9]以坛为家II

    发表于 2014-7-28 10:38:47 | 显示全部楼层 |阅读模式
    1、修改欢迎页内容
    /ect/banner

    2、添加启动项,启动脚本或命令
    /etc/rc.local

    3、开放服务端口(iptables)
    iptables -I INPUT -p tcp --dport 80 -j ACCEPT                // 对外开放80端口
    iptables -I INPUT -p tcp --dport 22 -j ACCEPT                // 对外开放22端口

    4、修改HostName
    /etc/config/system
    root@SianRouter:/# cat /etc/config/system
    config system
            option hostname 'SianRouter'
            option timezone 'CST-8'
            #log config for busybox syslod
            option log_type 'file'
            option log_size '250'
            option log_rotate '1'
            option log_file '/data/usr/log/messages'

    config timeserver 'ntp'
            option enable_server '0'
            list server '0.pool.ntp.org'
            list server '1.pool.ntp.org'
            list server '2.pool.ntp.org'
            list server '3.pool.ntp.org'
            list server '3.asia.pool.ntp.org'
            list server '0.asia.pool.ntp.org'
            list server '0.cn.pool.ntp.org'

    5、防火墙配置
    /etc/config/firewall



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

    本版积分规则

    手机版|小黑屋|Archiver|iOS开发笔记 ( 湘ICP备14010846号 )

    GMT+8, 2024-5-2 11:29 , Processed in 0.044229 second(s), 19 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

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