GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Alex Gleason (alex@gleasonator.com)'s status on Sunday, 16-Jul-2023 06:21:54 JST Alex Gleason Alex Gleason
    Realizing I don't know how computers work. "Source port" is a concept dreamed up by the utterly deranged.
    In conversation Sunday, 16-Jul-2023 06:21:54 JST from gleasonator.com permalink

    Attachments


    1. https://media.gleasonator.com/2dc62483fa96912f4fc79d93437b5a531bf1e53f9559868eb0131421f8b49509.jpg
    • Embed this notice
      Alex Gleason (alex@gleasonator.com)'s status on Sunday, 16-Jul-2023 06:23:46 JST Alex Gleason Alex Gleason
      in reply to
      • ​🇧​​🇷​​🇴​​🇳​​🇿​​🇪​​🇦​​🇬​​🇪​​🇭​​🇴​​🇬​​🇨​​🇷​​🇦​​🇳​​🇰​​🇪​​🇷​
      @BronzeAgeHogCranker What's the real answer then?
      In conversation Sunday, 16-Jul-2023 06:23:46 JST permalink
    • Embed this notice
      ​🇧​​🇷​​🇴​​🇳​​🇿​​🇪​​🇦​​🇬​​🇪​​🇭​​🇴​​🇬​​🇨​​🇷​​🇦​​🇳​​🇰​​🇪​​🇷​ (bronzeagehogcranker@geofront.rocks)'s status on Sunday, 16-Jul-2023 06:23:47 JST ​🇧​​🇷​​🇴​​🇳​​🇿​​🇪​​🇦​​🇬​​🇪​​🇭​​🇴​​🇬​​🇨​​🇷​​🇦​​🇳​​🇰​​🇪​​🇷​ ​🇧​​🇷​​🇴​​🇳​​🇿​​🇪​​🇦​​🇬​​🇪​​🇭​​🇴​​🇬​​🇨​​🇷​​🇦​​🇳​​🇰​​🇪​​🇷​
      in reply to
      seems incorrect but ok

      I mean for that to work you would essentially have to have no outbound firewall
      In conversation Sunday, 16-Jul-2023 06:23:47 JST permalink
    • Embed this notice
      feld (feld@bikeshed.party)'s status on Sunday, 16-Jul-2023 08:33:14 JST feld feld
      in reply to
      • ​🇧​​🇷​​🇴​​🇳​​🇿​​🇪​​🇦​​🇬​​🇪​​🇭​​🇴​​🇬​​🇨​​🇷​​🇦​​🇳​​🇰​​🇪​​🇷​
      No? That's how the TCP 3 way handshake works.

      A stateful firewall watches the packets as they come through to track the source port of the initial outbound packet (with SYN flag) to learn the port it should allow the other side to send their traffic back on.

      That's why it's terrible if anyone gets control of a computer inside your network: they can now open bidirectional communications, defeating the firewall
      In conversation Sunday, 16-Jul-2023 08:33:14 JST permalink
    • Embed this notice
      feld (feld@bikeshed.party)'s status on Sunday, 16-Jul-2023 08:37:21 JST feld feld
      in reply to
      • feld
      • ​🇧​​🇷​​🇴​​🇳​​🇿​​🇪​​🇦​​🇬​​🇪​​🇭​​🇴​​🇬​​🇨​​🇷​​🇦​​🇳​​🇰​​🇪​​🇷​
      A nice trick we used to do was to configure the firewall to disallow the user running the webserver (e.g., apache) from being able to send outbound traffic.

      It still works fine as a webserver, as it's not initiating the connection. But if someone finds a vulnerability and hacks the server, their attack can't make any network requests outbound to establish comms with the C&C server, download payloads, etc.

      You can still do that today but web stacks are getting complex and even the webserver may be making network requests to the open internet. Though if it was only to specific APIs you could allow that too...
      In conversation Sunday, 16-Jul-2023 08:37:21 JST permalink
    • Embed this notice
      lamp (lamp@berserker.town)'s status on Sunday, 16-Jul-2023 09:16:43 JST lamp lamp
      in reply to

      @alex So the destination port is used to identify the service, as you know 80 for http 22 for ssh etc.

      But multiple clients can connect to those servers at the same time, even multiple connections from the same client. So how does it tell those connections apart?

      So the client picks a random source port to initate the connection. From 1.1.1.1:12345 to 2.2.2.2:80 for example.

      This mapping is the basis of the TCP connection, so the server at 2.2.2.2:80 knows to send back to 1.1.1.1:12345 for this particular connection.

      In conversation Sunday, 16-Jul-2023 09:16:43 JST permalink
      Alex Gleason likes this.
    • Embed this notice
      lamp (lamp@berserker.town)'s status on Sunday, 16-Jul-2023 09:16:44 JST lamp lamp
      in reply to

      @alex TCP is multiplexed meaning multiple TCP connections can coexist at the same time. In order for this to work there has to be a source and destination port so that the other end of a connection knows where to send the packets back to.

      In conversation Sunday, 16-Jul-2023 09:16:44 JST permalink
      翠星石 likes this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.