: 30 stycznia 2015, 09:17
Tu masz rację. Otwieranie portów samby na świat (nie przez VPN), to proszenie się o kłopoty. Nie mniej jednak w teorii zwykły dnat wystarcza.
Polski portal użytkowników dystrybucji Debian GNU/Linux, dyskusje, artykuły, nowości, blog, porady, pomoc.
https://593930.wb34atkl.asia/
Wkleiłem i zamieszczam wynikpawkrol pisze:Jeśli na windows masz taki adres
To ustaw tak plik /etc/netwrok/interfaces na debianie: ( wklej to co masz tu napisane)Kod: Zaznacz cały
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 10.3.185.61 netmask 255.255.255.0 network 10.3.184.0 broadcast 10.3.191.255 gateway 10.3.184.1
po restarcie systemu debian:ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:d9:9c:7c
inet addr:10.3.185.61 Bcast:10.3.191.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fed9:9c7c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1041 errors:0 dropped:0 overruns:0 frame:0
TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:355583 (347.2 KiB) TX bytes:14358 (14.0 KiB)
lo Link encap:Local 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:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1776 (1.7 KiB) TX bytes:1776 (1.7 KiB)
Adresacia sieci jest ustalana odgórnie, nikt mi jej nie przydzielał. Interner pochodzi od lokalnego prowidera i łączę się z nim za pomocą routera cisco.Następnie restart i wklej wynik polecenia ifconfig.
Tak na marginesie kto Ci ustawiał adresacje sieci?
Czy to jest twoja wewnętrzna sieć ?
Dla mnie to się wzajemnie wyklucza, jakiś oksymoron.Saturn89 pisze:Adresacia sieci jest ustalana odgórnie, nikt mi jej nie przydzielał.
przez podanie# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth0 inet static
address 192.168.56.50
netmask 255.255.255.0
w uruchom nic nie reaguje. Po wpisaniu w cmd pingowania 192.168.56.50 tez nic się nie dzieje. Po wpisaniu w debiana tego samego pingowania wyskakuje :\\192.168.56.50
root@debian:/home/edward# ping 192.168.56.50
PING 192.168.56.50 (192.168.56.50) 56(84) bytes of data.
64 bytes from 192.168.56.50: icmp_req=1 ttl=64 time=0.088 ms
64 bytes from 192.168.56.50: icmp_req=2 ttl=64 time=0.051 ms
64 bytes from 192.168.56.50: icmp_req=3 ttl=64 time=0.041 ms
64 bytes from 192.168.56.50: icmp_req=4 ttl=64 time=0.056 ms
64 bytes from 192.168.56.50: icmp_req=5 ttl=64 time=0.057 ms
64 bytes from 192.168.56.50: icmp_req=6 ttl=64 time=0.175 ms
64 bytes from 192.168.56.50: icmp_req=7 ttl=64 time=0.072 ms
64 bytes from 192.168.56.50: icmp_req=8 ttl=64 time=0.047 ms
64 bytes from 192.168.56.50: icmp_req=9 ttl=64 time=0.072 ms
64 bytes from 192.168.56.50: icmp_req=10 ttl=64 time=0.065 ms
64 bytes from 192.168.56.50: icmp_req=11 ttl=64 time=0.066 ms
64 bytes from 192.168.56.50: icmp_req=12 ttl=64 time=0.052 ms
64 bytes from 192.168.56.50: icmp_req=13 ttl=64 time=0.072 ms
64 bytes from 192.168.56.50: icmp_req=14 ttl=64 time=0.057 ms
Kod: Zaznacz cały
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.56.50
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
Kod: Zaznacz cały
ifconfig
Kod: Zaznacz cały
eth0 Link encap:Ethernet HWaddr 08:00:27:7a:d5:20
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe7a:d520/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3804 errors:0 dropped:0 overruns:0 frame:0
TX packets:2253 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3334644 (3.1 MiB) TX bytes:215134 (210.0 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:e7:69:d7
inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fee7:69d7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:248 errors:0 dropped:0 overruns:0 frame:0
TX packets:1083 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39183 (38.2 KiB) TX bytes:74085 (72.3 KiB)
lo Link encap:Local 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:1353 errors:0 dropped:0 overruns:0 frame:0
TX packets:1353 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:134892 (131.7 KiB) TX bytes:134892 (131.7 KiB)
Kod: Zaznacz cały
PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data.
64 bytes from 192.168.56.101: icmp_req=1 ttl=128 time=0.919 ms
64 bytes from 192.168.56.101: icmp_req=2 ttl=128 time=0.567 ms
64 bytes from 192.168.56.101: icmp_req=3 ttl=128 time=0.649 ms
64 bytes from 192.168.56.101: icmp_req=4 ttl=128 time=0.453 ms
64 bytes from 192.168.56.101: icmp_req=5 ttl=128 time=0.535 ms
64 bytes from 192.168.56.101: icmp_req=6 ttl=128 time=0.420 ms
64 bytes from 192.168.56.101: icmp_req=7 ttl=128 time=0.389 ms
64 bytes from 192.168.56.101: icmp_req=8 ttl=128 time=0.606 ms
64 bytes from 192.168.56.101: icmp_req=9 ttl=128 time=0.513 ms
64 bytes from 192.168.56.101: icmp_req=10 ttl=128 time=0.409 ms
64 bytes from 192.168.56.101: icmp_req=11 ttl=128 time=0.508 ms
64 bytes from 192.168.56.101: icmp_req=12 ttl=128 time=0.363 ms
64 bytes from 192.168.56.101: icmp_req=13 ttl=128 time=0.460 ms
64 bytes from 192.168.56.101: icmp_req=14 ttl=128 time=0.580 ms
64 bytes from 192.168.56.101: icmp_req=15 ttl=128 time=0.361 ms
64 bytes from 192.168.56.101: icmp_req=16 ttl=128 time=0.415 ms
64 bytes from 192.168.56.101: icmp_req=17 ttl=128 time=0.572 ms
64 bytes from 192.168.56.101: icmp_req=18 ttl=128 time=0.484 ms
64 bytes from 192.168.56.101: icmp_req=19 ttl=128 time=0.727 ms
64 bytes from 192.168.56.101: icmp_req=20 ttl=128 time=0.445 ms
64 bytes from 192.168.56.101: icmp_req=21 ttl=128 time=0.716 ms
64 bytes from 192.168.56.101: icmp_req=22 ttl=128 time=0.486 ms
64 bytes from 192.168.56.101: icmp_req=23 ttl=128 time=0.539 ms
64 bytes from 192.168.56.101: icmp_req=24 ttl=128 time=0.436 ms
64 bytes from 192.168.56.101: icmp_req=25 ttl=128 time=0.568 ms
64 bytes from 192.168.56.101: icmp_req=26 ttl=128 time=0.389 ms
64 bytes from 192.168.56.101: icmp_req=27 ttl=128 time=0.561 ms
64 bytes from 192.168.56.101: icmp_req=28 ttl=128 time=0.492 ms
64 bytes from 192.168.56.101: icmp_req=29 ttl=128 time=0.540 ms
64 bytes from 192.168.56.101: icmp_req=30 ttl=128 time=0.562 ms
64 bytes from 192.168.56.101: icmp_req=31 ttl=128 time=0.474 ms
64 bytes from 192.168.56.101: icmp_req=32 ttl=128 time=0.576 ms
64 bytes from 192.168.56.101: icmp_req=33 ttl=128 time=1.37 ms
64 bytes from 192.168.56.101: icmp_req=34 ttl=128 time=0.645 ms
64 bytes from 192.168.56.101: icmp_req=35 ttl=128 time=0.398 ms
64 bytes from 192.168.56.101: icmp_req=36 ttl=128 time=0.383 ms
64 bytes from 192.168.56.101: icmp_req=37 ttl=128 time=0.544 ms
64 bytes from 192.168.56.101: icmp_req=38 ttl=128 time=0.543 ms
64 bytes from 192.168.56.101: icmp_req=39 ttl=128 time=0.425 ms
64 bytes from 192.168.56.101: icmp_req=40 ttl=128 time=0.387 ms
64 bytes from 192.168.56.101: icmp_req=41 ttl=128 time=0.568 ms
64 bytes from 192.168.56.101: icmp_req=42 ttl=128 time=0.567 ms
64 bytes from 192.168.56.101: icmp_req=43 ttl=128 time=0.417 ms
64 bytes from 192.168.56.101: icmp_req=44 ttl=128 time=0.545 ms
64 bytes from 192.168.56.101: icmp_req=45 ttl=128 time=0.470 ms
64 bytes from 192.168.56.101: icmp_req=46 ttl=128 time=0.504 ms
64 bytes from 192.168.56.101: icmp_req=47 ttl=128 time=0.538 ms
64 bytes from 192.168.56.101: icmp_req=48 ttl=128 time=0.472 ms
64 bytes from 192.168.56.101: icmp_req=49 ttl=128 time=0.461 ms
64 bytes from 192.168.56.101: icmp_req=50 ttl=128 time=0.493 ms
64 bytes from 192.168.56.101: icmp_req=51 ttl=128 time=0.689 ms
64 bytes from 192.168.56.101: icmp_req=52 ttl=128 time=0.406 ms
64 bytes from 192.168.56.101: icmp_req=53 ttl=128 time=0.581 ms
64 bytes from 192.168.56.101: icmp_req=54 ttl=128 time=0.510 ms
64 bytes from 192.168.56.101: icmp_req=55 ttl=128 time=0.397 ms
64 bytes from 192.168.56.101: icmp_req=56 ttl=128 time=0.380 ms
64 bytes from 192.168.56.101: icmp_req=57 ttl=128 time=0.691 ms
64 bytes from 192.168.56.101: icmp_req=58 ttl=128 time=0.576 ms
64 bytes from 192.168.56.101: icmp_req=59 ttl=128 time=0.563 ms
64 bytes from 192.168.56.101: icmp_req=60 ttl=128 time=0.413 ms
64 bytes from 192.168.56.101: icmp_req=61 ttl=128 time=0.622 ms
64 bytes from 192.168.56.101: icmp_req=62 ttl=128 time=0.356 ms
^C
--- 192.168.56.101 ping statistics ---
62 packets transmitted, 62 received, 0% packet loss, time 61002ms
rtt min/avg/max/mdev = 0.356/0.526/1.377/0.152 ms