分类: LINUX
2010-09-05 15:39:28
Last login: Tue Jan 1 00:04:04 2002
configure
[edit]
# set pas
[edit]
# set service nat rule 1
[edit]
# edit service nat rule 1
[edit service nat rule 1]
# set type source
[edit service nat rule 1]
# set tra
[edit service nat rule 1]
# set tran
[edit service nat rule 1]
# set
description inbound-interface outside-address
destination inside-address protocol
disable log source
exclude outbound-interface type
[edit service nat rule 1]
# set
Possible completions:
description Rule description
destination NAT destination parameters
disable Disable NAT rule
exclude Exclude packets matching this rule from NAT
inbound-interface
Inbound interface of NAT traffic
inside-address
Inside NAT IP (used by destination NAT only)
log NAT rule logging
outbound-interface
Outbound interface for NAT traffic
outside-address
Outside NAT IP (used by source NAT only)
protocol Protocol to NAT
source NAT source parameters
type Type of NAT [REQUIRED]
[edit service nat rule 1]
# set tr
[edit service nat rule 1]
# set tr
[edit service nat rule 1]
# set tra
[edit service nat rule 1]
# set tra
[edit service nat rule 1]
# set type
destination masquerade source
[edit service nat rule 1]
# set type
Possible completions:
source Source NAT
destination Destination NAT
masquerade Masquerade NAT
[edit service nat rule 1]
# set ou
outbound-interface outside-address
[edit service nat rule 1]
# set out
outbound-interface outside-address
[edit service nat rule 1]
# set outbound-interface
eth0 eth1 lo
[edit service nat rule 1]
# set outbound-interface
Possible completions:
[edit service nat rule 1]
# set outbound-interface et
eth0 eth1
[edit service nat rule 1]
# set outbound-interface eth
eth0 eth1
[edit service nat rule 1]
# set outbound-interface eth1
[edit service nat rule 1]
# set protocol al
Possible completions:
<0-255> IP protocol number
tcp_udp Both TCP and UDP
all All IP protocols
!
[edit service nat rule 1]
# set protocol all
[edit service nat rule 1]
# set tr
[edit service nat rule 1]
# set
description inbound-interface outside-address
destination inside-address protocol
disable log source
exclude outbound-interface type
[edit service nat rule 1]
# set type
destination masquerade source
[edit service nat rule 1]
# set type
Possible completions:
source Source NAT
destination Destination NAT
masquerade Masquerade NAT
[edit service nat rule 1]
# set type masquerade
[edit service nat rule 1]
# set source
address port
[edit service nat rule 1]
# set source ne
[edit service nat rule 1]
# set source
address port
[edit service nat rule 1]
# set source
Possible completions:
address Source IPv4 address, subnet, or range
port Source port
[edit service nat rule 1]
# set source address 0.0.0.0/0
[edit service nat rule 1]
# top
[edit]
# commit
[edit]
# save
Saving configuration to '/opt/vyatta/etc/config/config.boot'...
Done
[edit]
#
# set system gateway-address 220.178.8.225
[edit]
# commit
[edit]
# show interfaces
ethernet eth0 {
address 192.168.1.250/24
hw-id 00:30:48:83:9e:c8
}
ethernet eth1 {
address 220.178.8.220/24
hw-id 00:30:48:83:9e:c9
}
loopback lo {
}
[edit]
# ifocnfig
vbash: ifocnfig: command not found
[edit]
# ifconfig
vbash: ifconfig: command not found
[edit]
# set system host-name pk
[edit]
# commit
[edit]
# exit
Warning: configuration changes have not been saved.
exit
exit
logout
Welcome to Vyatta
Linux vyatta 2.6.32-1-586-vyatta #1 SMP Mon Aug 2 22:57:10 PDT 2010 i686
Welcome to Vyatta.
This system is open-source software. The exact distribution terms for
each module comprising the full system are described in the individual
files in /usr/share/doc/*/copyright.
Last login: Tue Jan 1 15:29:52 2002 from 220.178.8.220
configure
[edit]
# show interfaces
ethernet eth0 {
address 192.168.1.250/24
hw-id 00:30:48:83:9e:c8
}
ethernet eth1 {
address 220.178.8.220/24
hw-id 00:30:48:83:9e:c9
}
loopback lo {
}
[edit]
# set system name-server 202.102.192.68
[edit]
# commit
[edit]
# set system gateway-address 220.178.8.225
[edit]
# show
interfaces {
ethernet eth0 {
address 192.168.1.250/24
hw-id 00:30:48:83:9e:c8
}
ethernet eth1 {
address 220.178.8.220/24
hw-id 00:30:48:83:9e:c9
}
loopback lo {
}
}
service {
https
nat {
rule 1 {
outbound-interface eth1
protocol all
source {
address 0.0.0.0/0
}
type masquerade
}
}
ssh {
}
telnet {
}
}
system {
gateway-address 220.178.8.225
host-name pk
login {
user vyatta {
authentication {
encrypted-password $1$4XHPj9eT$G3ww9B/pYDLSXC8YVvazP0
}
}
}
name-server 202.102.192.68
ntp-server 0.vyatta.pool.ntp.org
package {
repository community {
components main
distribution stable
url
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
}
[edit]
#
[edit]
# set service dh
dhcp-relay dhcp-server dhcpv6-relay dhcpv6-server
[edit]
# set service dhcp-
dhcp-relay dhcp-server
[edit]
# set service dhcp-server shared-network-name com
Possible completions:
[edit]
# set service dhcp-server shared-network-name s
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name com
Possible completions:
[edit]
# set service dhcp-server shared-network-name com
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name D
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name com
Possible completions:
[edit]
# set service dhcp-server shared-network-name com
Possible completions:
[edit]
# set service dhcp-server shared-network-name su
Possible completions:
[edit]
# set service dhcp-server shared-network-name su
Possible completions:
[edit]
# set service dhcp-server shared-network-name 192.168.1.0/24
invalid DHCP pool name "192.168.1.0/24"
Set failed
[edit]
# set service dhcp-server shared-network-name p192.168.1.0/24
Possible completions:
[edit]
# set service dhcp-server shared-network-name po192.168.1.0/24
Possible completions:
[edit]
# set service dhcp-server shared-network-name
[edit]
# set service dh
dhcp-relay dhcp-server dhcpv6-relay dhcpv6-server
[edit]
# set service dhcp-
dhcp-relay dhcp-server
[edit]
# set service dhcp-server shared-network-name sub
Possible completions:
[edit]
# set service dhcp-server shared-network-name d
Possible completions:
[edit]
# set service dhcp-server shared-network-name d
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server
disabled global-parameters
dynamic-dns-update shared-network-name
[edit]
# set service dhcp-server
Possible completions:
disabled Option to disable DHCP server
dynamic-dns-update
DHCP server to dynamically update the Domain Name System (DNS)
global-parameters
Additional global parameters for DHCP server. You must
use the syntax of dhcpd.conf in this text-field. Using this
without proper knowledge may result in a crashed DHCP server.
Check system log to look for errors.
shared-network-name
DHCP shared network [REQUIRED]
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server global-parameters
Possible completions:
use the syntax of dhcpd.conf in this text-field. Using this
without proper knowledge may result in a crashed DHCP server.
Check system log to look for errors.
[edit]
# set service dhcp-server
disabled global-parameters
dynamic-dns-update shared-network-name
[edit]
# set service dhcp-server
Possible completions:
disabled Option to disable DHCP server
dynamic-dns-update
DHCP server to dynamically update the Domain Name System (DNS)
global-parameters
Additional global parameters for DHCP server. You must
use the syntax of dhcpd.conf in this text-field. Using this
without proper knowledge may result in a crashed DHCP server.
Check system log to look for errors.
shared-network-name
DHCP shared network [REQUIRED]
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set service dhcp-server shared-network-name te
Possible completions:
[edit]
# set service dhcp-server shared-network-name
Possible completions:
[edit]
# set interfaces openvpn v
Possible completions:
[edit]
# set interfaces openvpn
Possible completions:
[edit]
# set interfaces openvpn
Possible completions:
[edit]
# set interfaces openvpn
Possible completions:
[edit]
# set interfaces openvpn
Possible completions:
[edit]
# set interfaces openvpn tu
Possible completions:
[edit]
# set interfaces openvpn tu
Possible completions:
[edit]
# set interfaces openvpn
Possible completions:
[edit]
# set interfaces openvpn
Possible completions:
[edit]
# commit
[ service dhcp-server shared-network-name ]
invalid DHCP pool name ""
Commit failed
[edit]
# set service dhcp-server shared-network-name pk
[edit]
# commit
No DHCP lease subnets configured for shared network name 'pk'.
At least one DHCP lease subnet must be configured for each shared network.
DHCP server configuration commit aborted due to error(s).
Commit failed
[edit]
# set service dhcp-server shared-network-name pk subnet 192.168.1.0/24
[edit]
# set service dhcp-server shared-network-name pk subnet 192.168.1.0/24 default-router 202.102.192.68
[edit]
# set service dhcp-server shared-network-name pk subnet 192.168.1.0/24 st
start static-mapping static-route
[edit]
# set service dhcp-server shared-network-name pk subnet 192.168.1.0/24 start 192.168.1.5 stop 192.168.1.150
[edit]
# commit
[edit]
# save
Saving configuration to '/opt/vyatta/etc/config/config.boot'...
Done
[edit]
# show
interfaces {
ethernet eth0 {
address 192.168.1.250/24
hw-id 00:30:48:83:9e:c8
}
ethernet eth1 {
address 220.178.8.220/24
hw-id 00:30:48:83:9e:c9
}
loopback lo {
}
}
service {
dhcp-server {
shared-network-name pk {
subnet 192.168.1.0/24 {
default-router 202.102.192.68
:
interfaces {
ethernet eth0 {
address 192.168.1.250/24
hw-id 00:30:48:83:9e:c8
}
ethernet eth1 {
address 220.178.8.220/24
hw-id 00:30:48:83:9e:c9
}
loopback lo {
}
}
service {
dhcp-server {
shared-network-name pk {
subnet 192.168.1.0/24 {
default-router 202.102.192.68
start 192.168.1.5 {
stop 192.168.1.150
}
}
}
}
https
nat {
rule 1 {
outbound-interface eth1
protocol all
source {
address 0.0.0.0/0
}
type masquerade
}
}
ssh {
}
telnet {
}
}
system {
gateway-address 220.178.8.225
host-name pk
login {
user vyatta {
authentication {
encrypted-password $1$4XHPj9eT$G3ww9B/pYDLSXC8YVvazP0
}
}
}
name-server 202.102.192.68
ntp-server 0.vyatta.pool.ntp.org
package {
repository community {
components main
distribution stable
url
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
}
[edit]