Вы находитесь на странице: 1из 2

# ifconfig

br0 Link encap:Ethernet HWaddr 78:44:76:00:2B:41


inet addr:192.168.0.1 Bcast:192.168.0.7 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:741 errors:0 dropped:0 overruns:0 frame:0
TX packets:820 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:127722 (124.7 KiB) TX bytes:660907 (645.4 KiB)
eth0 Link encap:Ethernet HWaddr 78:44:76:00:2B:41
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:742 errors:0 dropped:0 overruns:0 frame:0
TX packets:820 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:127787 (124.7 KiB) TX bytes:660907 (645.4 KiB)
Interrupt:4
eth1 Link encap:Ethernet HWaddr 78:44:76:00:2B:41
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:286173 (279.4 KiB)
Interrupt:5
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 78:44:76:00:2B:41
inet addr:187.63.44.113 Bcast:187.63.44.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3032 errors:0 dropped:0 overruns:0 frame:0
TX packets:557 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:869111 (848.7 KiB) TX bytes:103886 (101.4 KiB)
Interrupt:2
# iptables -t nat _A PREROUTING -s 187.63.44.113 -i eth0 -j DNAT --to 192.168.0.
3
Bad argument `_A'
Try `iptables -h' or 'iptables --help' for more information.
# iptables -t nat -A PREROUTING -s 187.63.44.113 -i eth0 -j DNAT --to 192.168.0.
3
# iptables -t nat -A POSROUTING -s 187.63.44.113 -o eth0 -p tcp --dport 80 -j AC
CEPT
iptables: No chain/target/match by that name
# iptables -t nat -A POSROUTING -s 187.63.44.113 -o eth0 -p tcp --dport 80 -j AC
CEPT
iptables: No chain/target/match by that name
# iptables -t nat -A POSTROUTING -s 187.63.44.113 -o eth0 -p tcp --dport 80 -j A
CCEPT
# iptables -t nat -A POSTROUTING -s 192.168.0.3 -o eth0 -j SNAT --to 187.63.44.1
13
# iptables -t nat -A POSTROUTING -s 192.168.0.3 -o eth0 -p tcp --dport 80 -j ACC
EPT
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy DROP)
target prot opt source destination
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/SY
N TCPMSS clamp to PMTU
ACCEPT udp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABL
ISHED
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -A INPUT -p tcp --syn -s 192.168.0.1/255.255.255.0 -j ACCEPT
# iptables -A OUTPUT -p tcp --syn -s 192.168.0.1/255.255.255.0 -j ACCEPT
# iptables -A FORWARD -p tcp --syn -s 192.168.0.1/255.255.255.0 -j ACCEPT
# iptables -t nat -A POSTROUTING -s 192.168.0.1/255.255.255.0 -o eth0 -j MASQUER
ADE
# iptables -t nat -A POSTROUTING -s 192.168.0.1/255.255.255.0 -o wlan0 -j MASQUE
RADE
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 192.168.0.0/24 anywhere tcp flags:SYN,RST,AC
K/SYN
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT tcp -- 192.168.0.0/24 anywhere tcp flags:SYN,RST,AC
K/SYN
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 192.168.0.0/24 anywhere tcp flags:SYN,RST,AC
K/SYN
# iptables -A INPUT -j ACCEPT
# iptables -A OUTPUT -j ACCEPT
# iptables -A FORWARD -j ACCEPT
#

Вам также может понравиться