кто знает ,помогите , пробросить порты с wlan0 - на eth0 .., стоит ubuntu
Добавлено: 11 фев 2014, 17:21
ответы по сущетсву ---
Новый участник
Сообщения: 10
Благодарности: 0
Профиль | Редактировать | Отправить PM | Цитировать
eth0 Link encap:Ethernet HWaddr 00:25:22:d0:0a:cd
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::225fed0:acd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:138 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24694 (24.6 KB) TX bytes:3703 (3.7 KB)
Interrupt:26 Base address:0xc000
lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1664 (1.6 KB) TX bytes:1664 (1.6 KB)
wlan0 Link encap:Ethernet HWaddr 00:1b:11:ba:6b:d4
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21bfeba:6bd4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1663 errors:0 dropped:0 overruns:0 frame:0
TX packets:1868 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:826128 (826.1 KB) TX bytes:313520 (313.5 KB)
root@rim:/home/andrey# iptables -L -n -v -t nat
Chain PREROUTING (policy ACCEPT 18 packets, 2072 bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- wlan0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.168.2.1:80
Chain POSTROUTING (policy ACCEPT 113 packets, 6707 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 113 packets, 6707 bytes)
pkts bytes target prot opt in out source destination
Forward - стоит 1
да ,есть .. с нее и работаю !!!
настройки -вот такие -
iptables -t nat -A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.1:80
iptables -A FORWARD -i eth0 -o wlan0 -s 192.168.2.1/32 -m conntrack --ctstate DNAT -j ACCEPT
ip_forward - 1
sysctl.conf - #
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 4 4 1 7
##############################################################3
# Functions previously found in netbase
#
# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1
# Uncomment the next line to enable TCP/IP SYN cookies
#net.ipv4.tcp_syncookies=1
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1 --------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.all.forwarding=1
машина в локалке - ip 192.168.2.10 255.255.255.0 192.168.2.1 dns - 192.168.2.1- настроил так
но инета - нет