Aus einem Subnetzwerk auf des Internet zugreifen

Jupper

Active Member
Hallo zusammen,

ich habe zu Hause folgende Konstellation. Eine FritzBox die den Zugang ins Internet ermöglicht. an die ist ein PC angeschlossen, Master, dieser hat eine Netztwerkkarte, 192.168.178.114 DHCP über die FritzBox, und einen internen Hub, 1.1.1.1. An den Hub sind vier weitere PC angeschlossen, Slave1-4, 1.1.1.2-5. Die 1.1.1.1-5 IPs habe ich statisch vergeben.

Vom Master komme ich ohne Probleme ins Internet, ich kann auch auch die Slave Rechner zugreifen. Und die können sich auch untereinander sehen und zugreifen. Nur, wenn ich vom Slave ins Internet will, klappt das nicht. Ich habe bisher versucht ein Routing zu erstellen nach dieser Anleitung, leider ohne Erolg. https://www.freebsd.org/doc/handbook/network-routing.html

Wie kann ich das denn machen? Welche Methoden gibt es?

EDIT:

BS ist FreeBSD 11.1
 
Bin zwar etwas raus aus der Materie, aber könnte schon an dein Adressbereich liegen. Nimm das 10er. Also Klasse A Netzwerkadressbereich.
 
Du musst den Slaves sagen wer der Master (das Gateway) ist. In rc.conf stellst Du bei den Slaves ein:
defaultrouter="1.1.1.1"
1.1.1.1 ist in deren Netz, also findet der IP-Verkehr seinen Weg. Alle IP-Pakete deren Zieladresse nicht in deren Netz ist, senden sie dann an 1.1.1.1 weiter, also den Default-Router.

Damit die Fritzbox weiß wie sie das Netz 1.1.1.0 für Rückantworten erreichen kann, musst Du auch ihr eine Route einstellen oder auf dem Master NAT einstellen.
Das Netz 1.1.1.0 wäre für die Fritzbox erreichbar über das Gateway 192.168.178.114 (daher besser kein DHCP für solche Server).

Dann versuchst Du von einem Slave die Fritzbox anzupingen. Wenn das nicht klappt muss vermutlich noch
gateway_enable="YES" in die rc.conf vom Master eintragen.

Damit nun der Rest (DNS = die Namensauflösung) auch noch geht, musst Du bei den Slaves als Nameserver (/etc/resolv.conf) noch die Fritzbox einstellen.
nameserver 192.168.178.1

Falls Du wirklich 1.1.1.1 als IP benutzt und das kein Beispiel war, suche Dir ein dafür vorgesehenen Bereich aus, wie bluebyte schon empfohlen hat.
Die Subnetzmaske wäre noch wichtig für ein funktionierendes Besipiel.
 
Ich nehme mal an, dass es ein Beispiel war. Ich wüsste sonst keinen Grund, diesen IP-Bereich zu wählen. Zumal das Klasse A Netzwerk für den Privaten Bereich 10.0.0.0 ausreichende Adressen parat hat, mehr als das C Netzwerk, wo seine Fritzbox drin hängt. Eben, die Subnetmaske muss fürs A angepasst werden, da kann er nicht die von C, also die 255.255.255.0 nehmen, sondern 255.0.0.0 glaub ich.
 
Hallo zusammen,

danke für eure Antworten. Ja meine IPs waren 1.1.1.1-5. Habe das jetzt abgeändert zu 10.1.1.1-5 und netmask zu 255.0.0.0.

Habe jetzt bei der FitzBox eine statische Route erstellt.

30727513ma.png


rc.conf vom Master

Code:
hostname="master"
keymap="german.iso.acc.kbd"
ifconfig_bge0="DHCP"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
ifconfig_ed0="inet 10.1.1.1 netmask 255.0.0.0"
gateway_enable="YES"

rc.conf vom slave1,
Code:
hostname="slave1"
keymap="german.iso.acc.kbd"
ifconfig_bge0="inet 10.1.1.2 netmask 255.0.0.0"
defaultrouter="10.1.1.1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"

Wenn ich versuche vom Slave1 die Fritzbox anzubingen, klappts leider nicht.

Code:
root@slave1:~ # ping -c3 192.168.178.1
PING 192.168.178.1 (192.168.178.1): 56 data bytes

--- 192.168.178.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
 
Wenn ich versuche vom Slave1 die Fritzbox anzubingen, klappts leider nicht.
Pinge erstmal den 10.1.1.1 an, falls das geht, fehlt dir nurnoch net.inet.ip.forwarding oder/bzw. eine NAT-Regel in der Firewall

Firewall
/etc/pf.conf
Code:
$ext=... # wies halt auch immer bei dir heißt
$int="bge0"

set skip on lo
set block-policy drop
set loginterface egress

block in log all
pass in on $int keep state

pass out on $ext from $int:network to any nat-to ($ext) keep state

pass out on $ext from $ext:network to any keep state
Syntax könnte bei FreeBSD abweichen
 
Anpingen vom Master geht.

Code:
root@slave1:~ # ping -c3 10.1.1.1
PING 10.1.1.1 (10.1.1.1): 56 data bytes
64 bytes from 10.1.1.1: icmp_seq=0 ttl=64 time=0.524 ms
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.532 ms
64 bytes from 10.1.1.1: icmp_seq=2 ttl=64 time=0.530 ms

--- 10.1.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.524/0.529/0.532/0.003 ms

Wenn ich die /etc/pf.conf ändere kommt allerdings ein Syntraxfehler.

/etc/pf.conf

Code:
ext="ed0"
int="bge0"

set skip on lo
set block-policy drop
set loginterface egress

block in log all
pass in on $int keep state

pass out on $ext from $int:network to any nat-to ($ext) keep state

pass out on $ext from $ext:network to any keep state

Code:
root@master:~ # service pf start
Enabling pf/etc/pf.conf:11: syntax error
pfctl: Syntax error in config file: pf rules not loaded
.
 
Die letzten 2 Zeilen könnten OpenBSD spezifisch sein, sorry

pfctl -vvnf /etc/pf.conf
Dann siehste den Fehlergrund
 
Jupper: falls die Firewall vorher gar nicht eingerichtet war oder wenn es erstmal reicht, dass die Fritzbox die Firewall ist, dann würde ich die Firewall vom Master erstmal abschalten. Sonst hast Du zu viele Fehlerquellen. Ich glaube Du hast da int und ext vertauscht. Erstmal sollte der Ping vom Slave zur Fritzbox ohne Firewall klappen.

Wenn Du nur 10.1.1.x benutzt in Deinem Netzwerk, dann setze als Netmask 255.255.255.0 sonst kann das zu Missverständnissen führen. Die 255.0.0.0 ist für den Adressraum 10.x.x.x

Wie ist die Ausgabe vom Kommando sysctl net.inet.ip.forwarding auf dem Master?
 
Hallo zusammen,

habe die Firewall auf dem Master aus und Netmask auf 255.255.255.0 gesetzt.

rc.conf vom Master

Code:
hostname="master"
keymap="german.iso.acc.kbd"
ifconfig_bge0="DHCP"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
ifconfig_ed0="inet 10.1.1.1 netmask 255.255.255.0"
gateway_enable="YES"

rc.conf vom Slave1

Code:
hostname="slave1"
keymap="german.iso.acc.kbd"
ifconfig_bge0="inet 10.1.1.2 netmask 255.255.255.0"
defaultrouter="10.1.1.1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"

Code:
root@master:~ # sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 1

Code:
root@slave1:~ # ping -c3 192.168.178.1
PING 192.168.178.1 (192.168.178.1): 56 data bytes

--- 192.168.178.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
 
Es klappt nicht: 0 packets received, 100.0% packet loss

Hat der Master tatsächlich noch die gleiche IP (also die mit 192. per DHCP)?
Kannst Du mit tcpdump umgehen und mal auf dem Master ausführen? Dann pingst Du vom Slave die Fritzbox an und guckst was passiert, ob der Ping durch geht und wo die Antwort hängt.
 
Ja, der Master hat die gleiche IP. Die bleibt immer gleich.

Ich habe erst tcpdump auf dem Master gestartet danach den ping auf dem Slave1. ed0 ist der Netzwerkhub im Master.

Code:
root@master:~ # tcpdump -i ed0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ed0, link-type EN10MB (Ethernet), capture size 262144 bytes
18:37:28.084919 IP 10.1.1.1.26548 > 10.1.1.2.ssh: Flags [P.], seq 470486553:470486589, ack 375201659, win 1026, options [nop,nop,TS val 4535825 ecr 21160608], length 36
18:37:28.085880 IP 10.1.1.2.ssh > 10.1.1.1.26548: Flags [P.], seq 1:45, ack 36, win 1026, options [nop,nop,TS val 21267691 ecr 4535825], length 44
18:37:28.094856 IP 10.1.1.2.ssh > 10.1.1.1.26548: Flags [P.], seq 45:137, ack 36, win 1026, options [nop,nop,TS val 21267700 ecr 4535825], length 92
18:37:28.094922 IP 10.1.1.1.26548 > 10.1.1.2.ssh: Flags [.], ack 137, win 1025, options [nop,nop,TS val 4535835 ecr 21267691], length 0
18:37:28.094983 IP 10.1.1.2 > fritz.box: ICMP echo request, id 55811, seq 0, length 64
18:37:29.115670 IP 10.1.1.2 > fritz.box: ICMP echo request, id 55811, seq 1, length 64
18:37:30.124340 IP 10.1.1.2 > fritz.box: ICMP echo request, id 55811, seq 2, length 64
18:37:41.150327 IP 10.1.1.2.ssh > 10.1.1.1.26548: Flags [P.], seq 137:277, ack 36, win 1026, options [nop,nop,TS val 21280756 ecr 4535835], length 140
18:37:41.150418 IP 10.1.1.2.ssh > 10.1.1.1.26548: Flags [P.], seq 277:329, ack 36, win 1026, options [nop,nop,TS val 21280756 ecr 4535835], length 52
18:37:41.150478 IP 10.1.1.1.26548 > 10.1.1.2.ssh: Flags [.], ack 329, win 1023, options [nop,nop,TS val 4548891 ecr 21280756], length 0

Code:
root@slave1:~ # ping -c3 192.168.178.1
PING 192.168.178.1 (192.168.178.1): 56 data bytes

--- 192.168.178.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
 
Code:
root@master:~ # tcpdump -i bge0 > file.txt
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bge0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C107 packets captured
111 packets received by filter
0 packets dropped by kernel

Code:
root@master:~ # nano file.txt
19:09:47.655762 IP master.fritz.box.ssh > valentin-desktop.fritz.box.38940: Flags [P.], seq 2221456579:2221456695, ack 4005483182, win 1026$
19:09:47.655877 IP master.fritz.box.ssh > valentin-desktop.fritz.box.38940: Flags [P.], seq 116:232, ack 1, win 1026, options [nop,nop,TS v$
19:09:47.656064 IP valentin-desktop.fritz.box.38940 > master.fritz.box.ssh: Flags [.], ack 116, win 2244, options [nop,nop,TS val 185917620$
19:09:47.656090 IP valentin-desktop.fritz.box.38940 > master.fritz.box.ssh: Flags [.], ack 232, win 2244, options [nop,nop,TS val 185917620$
19:09:47.758552 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:48.682163 IP master.fritz.box.50409 > fritz.box.domain: 3723+ PTR? 114.178.168.192.in-addr.arpa. (46)
19:09:48.683123 IP fritz.box.domain > master.fritz.box.50409: 3723* 1/1/1 PTR master.fritz.box. (106)
19:09:48.683694 IP master.fritz.box.15858 > fritz.box.domain: 64355+ PTR? 103.178.168.192.in-addr.arpa. (46)
19:09:48.684500 IP fritz.box.domain > master.fritz.box.15858: 64355* 1/1/1 PTR valentin-desktop.fritz.box. (116)
19:09:48.685007 IP master.fritz.box.33590 > fritz.box.domain: 15527+ PTR? 34.178.168.192.in-addr.arpa. (45)
19:09:48.685810 IP fritz.box.domain > master.fritz.box.33590: 15527* 1/1/1 PTR Pedro.fritz.box. (104)
19:09:48.686259 IP master.fritz.box.65378 > fritz.box.domain: 52478+ PTR? 255.255.255.255.in-addr.arpa. (46)
19:09:48.687070 IP fritz.box.domain > master.fritz.box.65378: 52478 NXDomain 0/1/0 (114)
19:09:48.759302 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:49.413245 IP6 fe80::24e6:bbae:eab8:2e6e.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
19:09:49.708737 IP master.fritz.box.59904 > fritz.box.domain: 35754+ PTR? 1.178.168.192.in-addr.arpa. (44)
19:09:49.709542 IP fritz.box.domain > master.fritz.box.59904: 35754* 1/1/1 PTR fritz.box. (97)
19:09:49.710016 IP6 fe80::24e6:bbae:eab8:2e6e.54833 > ff02::c.1900: UDP, length 146
19:09:49.710281 IP master.fritz.box.18053 > fritz.box.domain: 7078+ PTR? 2.0.0.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.ip$
19:09:49.711553 IP fritz.box.domain > master.fritz.box.18053: 7078 NXDomain 0/1/0 (154)
19:09:49.760073 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:50.336334 IP valentin-desktop.fritz.box.38942 > master.fritz.box.ssh: Flags [P.], seq 2560534620:2560534664, ack 3270804320, win 460,$
19:09:50.337865 IP master.fritz.box.ssh > valentin-desktop.fritz.box.38942: Flags [P.], seq 1:61, ack 44, win 1026, options [nop,nop,TS val$
19:09:50.338207 IP valentin-desktop.fritz.box.38942 > master.fritz.box.ssh: Flags [.], ack 61, win 460, options [nop,nop,TS val 1859178882 $
19:09:50.720399 IP6 fe80::71ba:1204:5a20:f424.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
19:09:50.761587 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:50.761843 IP master.fritz.box.20482 > fritz.box.domain: 17488+ PTR? c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.i$
19:09:50.762649 IP fritz.box.domain > master.fritz.box.20482: 17488 NXDomain 0/1/0 (154)
19:09:51.761521 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:51.919232 IP fritz.box.35388 > 239.255.255.250.1900: UDP, length 123
19:09:52.496272 IP valentin-desktop.fritz.box.38942 > master.fritz.box.ssh: Flags [P.], seq 44:80, ack 61, win 460, options [nop,nop,TS val$
19:09:52.497625 IP master.fritz.box.ssh > valentin-desktop.fritz.box.38942: Flags [P.], seq 61:105, ack 80, win 1026, options [nop,nop,TS v$
19:09:52.497958 IP valentin-desktop.fritz.box.38942 > master.fritz.box.ssh: Flags [.], ack 105, win 460, options [nop,nop,TS val 1859181042$
19:09:52.506503 IP 10.1.1.2 > fritz.box: ICMP echo request, id 4356, seq 0, length 64
19:09:52.506666 IP master.fritz.box.ssh > valentin-desktop.fritz.box.38942: Flags [P.], seq 105:197, ack 80, win 1026, options [nop,nop,TS $
19:09:52.507011 IP valentin-desktop.fritz.box.38942 > master.fritz.box.ssh: Flags [.], ack 197, win 460, options [nop,nop,TS val 1859181051$
19:09:52.710123 IP6 fe80::24e6:bbae:eab8:2e6e.54833 > ff02::c.1900: UDP, length 146
19:09:52.761759 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:52.881758 IP master.fritz.box.32645 > fritz.box.domain: 15971+ PTR? 250.255.255.239.in-addr.arpa. (46)
19:09:52.882564 IP fritz.box.domain > master.fritz.box.32645: 15971 NXDomain 0/1/0 (103)
19:09:52.882994 IP master.fritz.box.54458 > fritz.box.domain: 50091+ PTR? 2.1.1.10.in-addr.arpa. (39)
19:09:52.918902 IP fritz.box.domain > master.fritz.box.54458: 50091 NXDomain 0/1/0 (88)
19:09:53.320293 IP6 fe80::1c6d:68ee:90aa:4d79.mdns > ff02::fb.mdns: 0 AAAA (QU)? BRW6814016F819A.local. (39)
19:09:53.330110 IP Daniels-MBP-2.fritz.box.mdns > 224.0.0.251.mdns: 0 AAAA (QU)? BRW6814016F819A.local. (39)
19:09:53.536678 IP 10.1.1.2 > fritz.box: ICMP echo request, id 4356, seq 1, length 64
19:09:53.688018 ARP, Request who-has master.fritz.box tell fritz.box, length 46
19:09:53.688030 ARP, Reply master.fritz.box is-at 00:14:c2:04:8d:13 (oui Unknown), length 28
19:09:53.764020 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:53.935909 IP master.fritz.box.18306 > fritz.box.domain: 42572+ PTR? b.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.i$
19:09:53.936715 IP fritz.box.domain > master.fritz.box.18306: 42572 NXDomain 0/1/0 (154)
19:09:53.937093 IP master.fritz.box.45495 > fritz.box.domain: 41941+ PTR? 68.178.168.192.in-addr.arpa. (45)
19:09:53.937896 IP fritz.box.domain > master.fritz.box.45495: 41941* 1/1/1 PTR Daniels-MBP-2.fritz.box. (112)
19:09:53.938280 IP master.fritz.box.11554 > fritz.box.domain: 17958+ PTR? 251.0.0.224.in-addr.arpa. (42)
19:09:53.939081 IP fritz.box.domain > master.fritz.box.11554: 17958 NXDomain 0/1/0 (99)
19:09:54.596700 IP 10.1.1.2 > fritz.box: ICMP echo request, id 4356, seq 2, length 64
19:09:54.763330 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:54.783765 IP Daniels-MBP-2.fritz.box.57621 > 192.168.178.255.57621: UDP, length 44
19:09:54.995848 IP master.fritz.box.20846 > fritz.box.domain: 23128+ PTR? 255.178.168.192.in-addr.arpa. (46)
19:09:54.996654 IP fritz.box.domain > master.fritz.box.20846: 23128 NXDomain* 0/1/0 (106)
19:09:55.763708 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:56.147932 IP Pedro.fritz.box.55302 > 239.255.255.250.1900: UDP, length 174
19:09:56.710306 IP6 fe80::24e6:bbae:eab8:2e6e.54833 > ff02::c.1900: UDP, length 146
19:09:56.764279 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:56.919187 IP fritz.box.35388 > 239.255.255.250.1900: UDP, length 123
19:09:57.151006 IP Pedro.fritz.box.55302 > 239.255.255.250.1900: UDP, length 174
19:09:57.322765 IP Daniels-MBP-2.fritz.box.mdns > 224.0.0.251.mdns: 0 AAAA (QM)? BRW6814016F819A.local. (39)
19:09:57.329156 IP6 fe80::1c6d:68ee:90aa:4d79.mdns > ff02::fb.mdns: 0 AAAA (QM)? BRW6814016F819A.local. (39)
19:09:57.735229 IP Acer.fritz.box.54835 > 239.255.255.250.1900: UDP, length 133
19:09:57.765332 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:58.147015 IP master.fritz.box.15547 > fritz.box.domain: 11004+ PTR? 108.178.168.192.in-addr.arpa. (46)
19:09:58.148286 IP fritz.box.domain > master.fritz.box.15547: 11004* 1/1/1 PTR Acer.fritz.box. (104)
19:09:58.151104 IP Pedro.fritz.box.55302 > 239.255.255.250.1900: UDP, length 174
19:09:58.720027 IP6 fe80::71ba:1204:5a20:f424.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
19:09:58.765731 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:09:59.150898 IP Pedro.fritz.box.55302 > 239.255.255.250.1900: UDP, length 174
19:09:59.710161 IP6 fe80::24e6:bbae:eab8:2e6e.54833 > ff02::c.1900: UDP, length 146
19:09:59.766625 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:00.725877 IP Acer.fritz.box.54835 > 239.255.255.250.1900: UDP, length 133
19:10:00.767049 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:01.767642 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:01.919106 IP fritz.box.35388 > 239.255.255.250.1900: UDP, length 123
19:10:02.710181 IP6 fe80::24e6:bbae:eab8:2e6e.54833 > ff02::c.1900: UDP, length 146
19:10:02.769309 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:03.725896 IP Acer.fritz.box.54835 > 239.255.255.250.1900: UDP, length 133
19:10:03.768946 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:03.920746 IP android-c42146e070ff15d5.fritz.box > igmp.mcast.net: igmp v3 report, 1 group record(s)
19:10:04.311771 IP master.fritz.box.19933 > fritz.box.domain: 26947+ PTR? 109.178.168.192.in-addr.arpa. (46)
19:10:04.312578 IP fritz.box.domain > master.fritz.box.19933: 26947* 1/1/1 PTR android-c42146e070ff15d5.fritz.box. (124)
19:10:04.312965 IP master.fritz.box.23867 > fritz.box.domain: 12105+ PTR? 22.0.0.224.in-addr.arpa. (41)
19:10:04.330932 IP fritz.box.domain > master.fritz.box.23867: 12105 1/0/0 PTR igmp.mcast.net. (69)
19:10:04.769448 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:04.887537 IP android-c42146e070ff15d5.fritz.box > igmp.mcast.net: igmp v3 report, 1 group record(s)
19:10:05.728944 IP master.fritz.box.ssh > valentin-desktop.fritz.box.38942: Flags [P.], seq 197:353, ack 80, win 1026, options [nop,nop,TS $
19:10:05.729283 IP valentin-desktop.fritz.box.38942 > master.fritz.box.ssh: Flags [.], ack 353, win 476, options [nop,nop,TS val 1859194274$
19:10:05.770153 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:06.710211 IP6 fe80::24e6:bbae:eab8:2e6e.54833 > ff02::c.1900: UDP, length 146
19:10:06.730642 IP Acer.fritz.box.54835 > 239.255.255.250.1900: UDP, length 133
19:10:06.770733 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:06.919102 IP fritz.box.35388 > 239.255.255.250.1900: UDP, length 123
19:10:07.771326 IP Pedro.fritz.box.57160 > 255.255.255.255.7533: UDP, length 34
19:10:08.428544 IP fritz.box.netbios-dgm > 192.168.178.255.netbios-dgm: NBT UDP PACKET(138)
19:10:08.429006 IP fritz.box.netbios-dgm > 192.168.178.255.netbios-dgm: NBT UDP PACKET(138)
19:10:08.508257 IP Daniels-MBP-2.fritz.box.netbios-dgm > 192.168.178.255.netbios-dgm: NBT UDP PACKET(138)
19:10:08.508567 IP Daniels-MBP-2.fritz.box.netbios-ns > 192.168.178.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
19:10:08.509817 IP Daniels-MBP-2.fritz.box.netbios-dgm > 192.168.178.255.netbios-dgm: NBT UDP PACKET(138)
 
tcpdump kann auch Filtern. Es sind nur Zeilen mit ICMP interessant.
Also die Pings gehen zur Fritzbox, aber von dort kommt keine Antwort rein.
Setz da mal die statische Route in der Fritzbox auf 10.1.1.0 mit Netzmask 255.255.255.0. Gateway sollte ja schon 192.168.178.114 sein. Geh sicher, dass die Einstellung übernommen wurde.
Kann die Fritzbox pingen? Also aus der Web-Oberfläche heraus mal 10.1.1.2 anpingen.
 
Ok, Netmask auf 255.255.255.0 bei der statischen Route der FritzBox hat funktioniert. Kann die FritzBox anpingen.

Code:
root@slave1:~ # ping -c3 192.168.178.1
PING 192.168.178.1 (192.168.178.1): 56 data bytes
64 bytes from 192.168.178.1: icmp_seq=0 ttl=63 time=1.624 ms
64 bytes from 192.168.178.1: icmp_seq=1 ttl=63 time=1.010 ms
64 bytes from 192.168.178.1: icmp_seq=2 ttl=63 time=1.005 ms

--- 192.168.178.1 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.005/1.213/1.624/0.291 ms

Jetzt muss ich nur noch die FritzBox bei den Slaves als Nameserver eintragen, damit die ins Internet, für Updates etc., können oder?
 
Ja, Nameserver wie in Post #3 eintragen.

Ist ed0 so eine PCI Netzwerkkarte mit 4 Ports, die als 10 MBit Hub funktioniert? So eine liegt hier auch noch rum...
 
Falls es nur darum geht, dass die Slaves irgendwie per LAN ins Internet kommen, kann man sich das ganze Subnetting und Routing auch sparen, indem man aus den Netzwerkkarten im Master einen Switch baut. https://www.freebsd.org/cgi/man.cgi?if_bridge
Master rc.conf:
Code:
cloned_interfaces="bridge0"
       ifconfig_bridge0="addm bge0 addm ed0 DHCP"
       ifconfig_bge0="up"
       ifconfig_ed0="up"

Bei den Slaves kann man dann DHCP aktivieren und die Fritzbox braucht keine Rückroute. Alle Teilnehmer wären im gleichen Adressbereich.
 
Zurück
Oben