iptables -F
iptables -X
iptables -F -t -nat
iptables -X -t -nat
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE
iptables -t nat -L -n
echo "1" > /proc/sys/net/ipv4/ip_forward
service network restart
sysctl -p
/etc/sysctl.conf
/etc/rc.d/rc.local
/etc/init.d/network restart
eth0對外
192.168.1.123 163.xxx.xxx.xxx
255.255.255.0 255.255.255.128
192.168.1.1
eth1對內
192.168.0.33 192.168.0.1
255.255.255.0 255.255.255.0
==========================================================================
SAMBA
[global]
workgroup = classb
server string = Samba Server
netbios name = MYSERVER
security = share
encrypt passwords = no
; guest ok = no
; guest account = nobody
[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writable = No
printable = yes
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
[user]
comment = oAoAo
path = /home/user
writeable = yes
; browseable = yes
guest ok = yes
===========================================================================
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.204.160.240