Commit Graph

920 Commits

Author SHA1 Message Date
fdc3877e4f Fix some spelling mistakes 2019-05-15 14:38:07 -05:00
93f0c6e4a3 Allow ping/arp/traceroute to cancel by 'x'
WellDone ought to default to "false" so that canceling the
form does not return a true.

However, that then means that the validating (particularly for DHCP)
needs to be handled differently.   Otherwise validation would ONLY
occur when you press OK.   (Not a terrible thing, but also not ideal.)

In any case, this is a solution I found on the internet. It seems
to work nicely. Validating still runs unless the form is closing
(via ESC, Cancel, or X), including when moving from textbox to
textbox, or tabbing to OK.

I think this also solves a lingering problem where DHCP couldn't
X out without attempting to validate.   So it feels like an all-around winner.

Step to reproduce:   Level0 ping test
1.) on net_switch0, try to ping pc0.
   -tab through and notice that pc0 resolves to 192.168.1.2 on OK button.
 2.) close with form window using X
   -notice that the ping happens anyway.   Same is true for arp and traceroute.
2019-04-29 17:15:10 -05:00
5d06bfd8f3 Simple typo. 192.168 instead of 102.168 2019-04-29 16:32:32 -05:00
a0790918fb Tag PC3 on Level 6 VLAN Firewalls (Level6_VLANRouting3). It was on the default vlan instead of the student vlan. 2019-04-15 08:33:51 -05:00
c2f41ae5b9 tracert: respond from requested IP address
If a device does a traceroute to the opposite side of a router,
the traceroute request will continue on to the next gateway
until it dies from not being able to return on the same NIC.

Instead, respond to traceroute requests from the "pinged"
ip address (so that the originator stops requesting more
tracert packets) instead of the closest address to the
originator.

Scenario: Level 3 It is dead, Jim
1.) from PC1, traceroute to the far side of router2 (192.168.3.2).
Notice that the tracert continues on two times to router0 before
dying.
2019-04-13 10:18:02 -05:00
f5cb1875d2 Allow forwarding devices to respond to tracert_requests
Things like switches could not be tracert'd.

Scenario: Level 3 It is dead, Jim.
1.) from PC2, do a tracert to net_switch0.
Notice that there is no response.
2019-04-13 10:13:12 -05:00
5e39a2896d No routing/sending destination for ZeroIPString
pinging 0.0.0.0 should not go anywhere, but previously
it could be routed anywhere by default gateways etc.

Scenario: Level 3 It's dead Jim
1.) set the gateway for PC2 to router2
2.) ping net_switch1
The ping travels halfway around the network before it is dropped.

Even worse is L4 Who done it, where
originally the puzzle could be solved by
just pinging 0.0.0.0 enough times.
2019-04-13 10:08:32 -05:00
4a72518ccc Don't lose DHCP range when NIC address changes
When a server or firewall changes the IP address of a network
card, any DHCP ranges associated with that old number were
zeroed out.

Invalidating the range COULD be a nice feature in case the
new IP address falls within the DHCP range - thus preventing
conflicting IP addresses. So just to be nice I did allow the
range to invalidate in that situation. However, in real life
it wouldn't be so nice, and so perhaps it would actually be
better to keep the existing rules intact even if it would
cause a problem.

Scenario: Level 2 Firewall Test
-change firewall eth0 to 192.168.1.10 and eth1 to 192.168.2.20
-click OK
-edit firewall again and look at the DHCP rules
    -notice that 192.168.1 has all zeros.
    -same thing with 192.168.2
    -after the fix, the 192.168.2 rules are retained since
   2.20 doesn't conflict with the range, but 1.10 does
   conflict, so that rule was invalidated.
2019-04-13 10:05:22 -05:00
cecd14a901 Do a better job with network interfaces when faced with vlans 2019-03-17 14:26:51 +03:00
073cba135e Basic renumbering working. Will blow up on a machine with multiple network interfaces. 2019-03-07 17:02:49 +03:00
e27d960403 Add a comment about the hosts func 2019-03-06 12:38:08 +03:00
4014439162 Many small changes working towards renumbering a subnet. If many items are selected, we can right-click and renumber the lot of them. 2019-03-06 12:32:00 +03:00
c0b655386e Adding a bunch of strings 2019-03-06 12:30:51 +03:00
199ecbcf06 Add an initial RenumberData class. Used when processing devices and figuring out which devices are part of a particular broadcast network. 2019-03-06 12:30:28 +03:00
966f4fe8a8 Add the ability to prompt for a network, subnet, and gateway. Used when renumbering a subnet. 2019-03-06 12:29:19 +03:00
b1a13b95bc Add a "GetUntaggedVLAN" func to return the VLAN that is untagged on this interface. 2019-03-06 11:36:10 +03:00
fded1f454a Add functions to find the devices connected to this device 2019-03-06 09:43:39 +03:00
a72aec9f9a At least with this added test, the student must find and fix the hidden laptop. Not enough to solve the problem, but a step in the right direction. This test works because it requires the IP address to be unique. 2019-02-28 09:57:14 -06:00
bed1a8a846 When the router needs to be replaced, it should not have the correct routes. You should need to add the right IP addresses and routes both. 2019-02-28 09:01:05 -06:00
9bf9d58c48 IPAE: DNS lookup provides subnet mask as well as IP
If the user types in a name in the IP Address Entry form,
       also replace the subnet mask.

       This is particularly useful for pinging, since ping doesn't
       allow access to the subnet mask field, and if an inappropriate
       mask is autoIP-entered, then the results might be unexpected.

       Exception for DHCP ranges: Actually, it shouldn't be necessary
       (since the IP address field is disabled for DHCP), but just
       for completeness, I ensure that the second field is not altered
       for DHCP range entries.

       Scenario: Level4, Small Subnets
       1.) fix router2, so the subnet mask is /30
       2.) from pc1, ping pc2 (which is address 192.168.1.3)
                       -lastIP sets subnet mask to 255.255.255.252
                       -that makes .3 the broadcast address
       -fix result: lastIP mask is replaced by pc2's real mask.
2019-02-27 10:16:59 -06:00
2a17fba36c broadcast address only applies to correct subnet
Ultimately, the problem stemmed from a ping to an address
       with the wrong subnet mask (auto-filled subnet) which turned
       the address (which should have been routed) into a local broadcast.
       Only the global broadcast, or a local broadcast should be accepted,
       not a broadcast that should be routed.

       This can be seen in Level 4, Small Subnets puzzle.
       1.) fix router2 to be /31
       2.) from pc1, ping pc2 (which turns into 192.168.1.3)
                       -autoIP filled in a subnet mask of 255.255.255.252
                       -therefore 1.3 is considered the broadcast IP.
       -result: a local broadcast on the 192.168.2 network.
       3.) from pc1, ping 192.168.1.1 or 192.168.1.4 works fine.
       4.) edit firewall1, edit route to 192.168.1.1
                       -make no changes, just hit OK
       5.) again from pc1 ping pc2
                       -now autoIP fills in subnet mask 255.255.255.0
       -result: it works
2019-02-27 08:41:58 -06:00
886e1d7911 allow DHCP range to cancel
The problem is easily seen most times when a DHCP range is canceled.
       The cancel completely fails to work, and refuses to cancel until
       correct values are put in start and end. (However, pressing the ESC
       key sometimes helped.)
2019-02-23 12:20:24 -06:00
06eb896558 cancel should also cancel auto-filled lastIP values
The problem is seen in the first puzzle if you ping
       pc0, and then edit the 0.0.0.0 gateway.   It auto-fills in
       the last-used pc0 IP address, and canceling saves that change
       instead of leaving the gateway at 0.0.0.0.

       lastIP nicely saves some typing (although it has also confused
       my student quite a bit I think), but since it updates WhatToEdit,
       that becomes the "saved" value even during a cancel.

       Instead, save the original value as a copy, and set back to
       the original value when cancellng.

       Perhaps it would be worth creating a reparse( NB_IPAddress)
       function, but this was easy to just hack together.

       Tested by pinging pc0, then editing the gateway and cancellng,
       editing the IP address and canceling.

       Next: don't add a canceled route
2019-02-23 12:16:04 -06:00
ddebafeec9 don't add a canceled, empty route
This was especially bad when lastIP filled in default values,
       so this patch pretty much depends on the patch that cancels
       the auto-filled lastIP.

       This didn't cause a problem - it just cluttered up the routing
       table with duplicate, undeletable routes.
2019-02-23 12:08:01 -06:00
2ae5781bea Don't crash when adding a NIC to a PC/server (Justin) 2019-02-23 12:06:24 -06:00
fa163b3d21 ubuntu 18.04 2019-02-22 14:24:45 -06:00
5e916e82a4 Hopefully correct the READ.md file so it displays properly and has the right info. 2019-02-22 13:26:06 -06:00
7c292f5b7d Justin Luth:
ping source is firewall ? set sourceIP to vpn IP address

       The problem can be seen easily in Puzzle 2, VPN Demo.
       From firewall2, ping firewall0. The ping request tunnels
       to firewall0 with a source address of 0.0.0.0, and so
       the reply returns untunneled and drops at the default gateway.

       This patch probably needs to be tweaked a bit in case it
       covers too many situations, but in general something like
       this is needed.
2019-02-22 13:15:43 -06:00
110a751d25 Add time-based delay to slow packet movement on super-fast computers 2019-01-23 08:24:30 -06:00
c66aa99a28 Adding entry for next version number in preparation for adding release note documentation as we make changes. 2018-10-23 11:47:03 -05:00
36dd9639b3 Update to version number from publishing 2018-10-23 11:46:07 -05:00
9de1acf82f A trivial update to the release notes 2018-10-23 11:45:49 -05:00
408e769631 Update version number for publishing 2018-10-23 11:44:34 -05:00
d1e3a4dda9 Update release notes 2018-10-23 09:03:51 -05:00
bf820055ca When doing multiple regression tests, add a counter to the name so we see a status. 2018-10-23 08:52:28 -05:00
facd5d1ea1 Able to change gateway if device has both DHCP and ethernet, but the ethernet is the one plugged in. 2018-10-23 08:25:04 -05:00
2b92fea4cb Do not check firewall rules if the firewall is disabled 2018-10-23 08:01:43 -05:00
c8c66970d0 Get reload to work properly 2018-10-23 07:57:02 -05:00
e6e6328eca Start regression window with untested and failed checked. 2018-10-17 16:58:03 -05:00
59d8fd7e47 Level 6 regression testing completed 2018-10-17 16:56:06 -05:00
8d848eaa39 select the first unfinished puzzle on the level if one is available 2018-10-17 16:23:13 -05:00
b74f9932bb Fix bug with replays and VLANs 2018-10-17 15:23:30 -05:00
811339b176 Network timeout during replay 2018-10-17 14:56:28 -05:00
17b127d69d Fix a bug where resetting a switch did not reset the vlans on the switch 2018-10-17 14:38:42 -05:00
f2c2f9bb96 Level 5 replays 2018-10-16 12:52:01 -05:00
b6d2eb0a60 Some of level 5 2018-10-12 17:38:36 -05:00
48bf63b967 Replays for level 4 2018-10-11 15:08:17 -05:00
b623ebd9ec Fix some duplication when things added. 2018-10-11 14:44:18 -05:00
d0fcba7854 Level 3 replays 2018-10-11 11:24:26 -05:00
27a29ff44f Some older replays which were skipped 2018-10-10 16:15:45 -05:00