找一台多网卡的x86机器,建议内存最低为2G 硬盘2G以上,引导后,默认账号和密码都为vyos,登录后输入install system一路回车。
配置如下:
vyos@TOR# run show configuration
firewall {
all-ping enable
broadcast-ping disable
config-trap disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name external-in {
default-action drop
rule 10 {
action accept
state {
established enable
related enable
}
}
}
name external-local {
default-action drop
rule 10 {
action accept
state {
established enable
related enable
}
}
}
name internal {
default-action drop
rule 10 {
action accept
state {
established enable
related enable
}
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
twa-hazards-protection disable
}
interfaces {
ethernet eth0 {
address 192.168.1.10/24
description external
duplex auto
firewall {
in {
name external-local
}
}
hw-id 00:0c:29:a8:9a:33
smp_affinity auto
speed auto
}
ethernet eth1 {
address 10.133.1.254/24
description internal
duplex auto
firewall {
in {
name internal
}
}
hw-id 00:0c:29:a8:9a:3d
smp_affinity auto
speed auto
}
ethernet eth2 {
address 10.158.1.254/24
description dmz
duplex auto
hw-id 00:0c:29:a8:9a:47
smp_affinity auto
speed auto
}
ethernet eth3 {
duplex auto
hw-id 00:0c:29:a8:9a:51
smp_affinity auto
speed auto
}
loopback lo {
address 10.255.255.1/32
}
}
nat {
source {
rule 1 {
outbound-interface eth0
source {
address 10.133.1.0/24
}
translation {
address masquerade
}
}
rule 2 {
outbound-interface eth0
source {
address 10.158.1.0/24
}
translation {
address masquerade
}
}
}
}
service {
dhcp-server {
disabled false
shared-network-name LAN {
authoritative disable
subnet 10.133.1.0/24 {
default-router 10.133.1.254
dns-server 8.8.8.8
domain-name vyos.org
lease 86400
start 10.133.1.100 {
stop 10.133.1.200
}
}
}
}
dns {
forwarding {
cache-size 150
listen-on eth1
name-server 8.8.8.8
name-server 8.8.4.4
}
}
ssh {
port 22
}
}
system {
config-management {
commit-revisions 20
}
console {
device ttyS0 {
speed 9600
}
}
gateway-address 192.168.1.1
host-name TOR
login {
user vyos {
authentication {
encrypted-password ****************
plaintext-password ****************
}
level admin
}
}
ntp {
server 0.pool.ntp.org {
}
server 1.pool.ntp.org {
}
server 2.pool.ntp.org {
}
}
package {
auto-sync 1
repository community {
components main
distribution helium
password ****************
url http://packages.vyos.net/vyos
username ""
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone Asia/Hong_Kong
}
[edit]