2018
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# ubuntu 下安装使用 aria2
|
||||
|
||||
- http://blog.csdn.net/crazycui/article/details/52205908
|
||||
|
||||
## 安装
|
||||
|
||||
> sudo apt install aria2
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# linux 下使用iptables 做路由转发
|
||||
|
||||
- 参考自 http://blog.csdn.net/whatday/article/details/53634954
|
||||
|
||||
## 环境
|
||||
|
||||
两台设备:
|
||||
ubuntu 16.04
|
||||
eth0 192.168.1.2/24 192.168.1.2
|
||||
wlan0 10.138.177.83 *.*.*.*
|
||||
raspberry pi b+
|
||||
eth0 192.168.1.10/24 192.168.1.2
|
||||
|
||||
## iptables 命令
|
||||
|
||||
参考自 http://man.linuxde.net/iptables
|
||||
|
||||
``` bash
|
||||
iptables -t 表名 <-A/I/D/R> 规则链名 [规则号] <-i/o 网卡名> -p 协议名 <-s 源IP/源子网> --sport 源端口 <-d 目标IP/目标子网> --dport 目标端口 -j 动作
|
||||
|
||||
```
|
||||
|
||||
## 设置静态ip
|
||||
|
||||
> sudo nano /etc/network/interfaces
|
||||
|
||||
``` bash
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.168.8.100
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.8.2
|
||||
dns-nameserver 119.29.29.29
|
||||
```
|
||||
|
||||
> sudo /etc/init.d/networking restart # 重启网络
|
||||
@@ -0,0 +1,8 @@
|
||||
# update-alternatives
|
||||
|
||||
``` bash
|
||||
# 设置优先级
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
|
||||
# 查询版本
|
||||
sudo update-alternatives --query gcc
|
||||
```
|
||||
Reference in New Issue
Block a user