Network configuration: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
mNo edit summary
Brian Wilson (talk | contribs)
Line 73: Line 73:


Now go to the firewall tab and look for the ruleset that blocks the traffic. Add a new rule and allow the traffic for this address group under the source/destination tab - depending on what you want to whitelist. Be sure to check the rule order so the "allow" comes before any "reject" or "drop". Otherwise the connection might be rejected/denied before the whitelist rule gets even checked..."
Now go to the firewall tab and look for the ruleset that blocks the traffic. Add a new rule and allow the traffic for this address group under the source/destination tab - depending on what you want to whitelist. Be sure to check the rule order so the "allow" comes before any "reject" or "drop". Otherwise the connection might be rejected/denied before the whitelist rule gets even checked..."
It appears to be working; I can still see attempts in the "STATS" tab for WAN-IN but nothing on the Asterisk console.
This should reduce the work that Bellman has to do, checking ACL lists.


=== Getting syn flooded from 23.225.141.70 ===
=== Getting syn flooded from 23.225.141.70 ===

Revision as of 04:16, 6 November 2018

Overview

  • Aris DOCSIS modem in bridge mode provided by Spectrum (no WiFi thank you very much!)
  • Ubiquiti Edgerouter as firewall and 4 ports (one is used up by the DLINK)
  • 8 port DLINK 1G switch
  • Unifi AP-AC-Lite access point; Unifi controller in Docker on Bellman

Bellman provides DNS and DHCP

  • WLAN wildsong2 2.4 GHz
  • WLAN wildsong5 5 GHz

Someday I might put up SSID=wildsong for guest access and create a separate VLAN but at the moment I have more interesting things to do.

Wired

  • Bellman server
  • Murre Windows 10 Desktop
  • Other random gadgets come and go including a Raspberry Pi
  • 1 Grandstream Android phone

Wireless via Unifi

I think everything but the Squeezebox should work on 5 GHz but 2.4 works better in the living room sometimes.

In the eLab,

  • Desktop Tern in the eLab.
  • 1 Grandstream Android phone

Laptops

Squeezebox, 2.4 GHz ONLY

EdgeRouter-X

2018-11-05 Current firmware is 1.9.7; 1.10.7 is available and a few fixes might be relevant.

Use bwilson account to get access

You can SSH into it or go to its web interface.

I have a basic firewall set up here.

Port forwarding to Bellman

  • SSH
  • Asterisk (UDP for RTP, 5060-5061 for SIP)
  • HTTPS (not HTTP!)

Masquerade for outbound traffic

Firewall ruleset

In the Port Forwarding tab, turn off the feature that automatically allows port forwarded traffic.

In the WAN_IN ruleset, I have 6 rules now

  1. Allow established/related
  2. Drop invalid state
  3. Accept HTTPS on eth0
  4. Accept SSH port 22 on eth0
  5. Accept media traffic - ports 10000-20000 both TCP and UDP
  6. Accept all Twilio traffic for North America (using a group)

Getting hammered from the Internet on my Asterisk server

Set up a whitelist for Twilio and block all other outside SIP traffic.

"Simply create an address group, name it "whitelist" and add the allowed IP addresses.

Now go to the firewall tab and look for the ruleset that blocks the traffic. Add a new rule and allow the traffic for this address group under the source/destination tab - depending on what you want to whitelist. Be sure to check the rule order so the "allow" comes before any "reject" or "drop". Otherwise the connection might be rejected/denied before the whitelist rule gets even checked..."

It appears to be working; I can still see attempts in the "STATS" tab for WAN-IN but nothing on the Asterisk console. This should reduce the work that Bellman has to do, checking ACL lists.

Getting syn flooded from 23.225.141.70

ssh 192.168.123.1
configure

# Find a good rule number to use
show firewall name WAN_IN

# Add the rule to blacklist the attacker
set firewall name WAN_IN rule 40 action drop
set firewall name WAN_IN rule 40 source address 23.225.141.70
set firewall name WAN_IN rule 40 protocol tcp
commit; save

# Did not work!
delete firewall name WAN_IN rule 40
commit; save
# Heavy handed, but we're running all services on HTTP anyway
# Just drop port forwarding for port 80!
show port-forward
rule 4 {
    description HTTP
    forward-to {
        address 192.168.123.2
        port 80
    }
    original-port 80
    protocol tcp
}
...
delete port-forward rule 4
commit; save

This worked. For now anyway.

Unifi

Use vastra account to get access to UniFi server in Docker.

2018-11-05 Firmware revision is 3.9.27.8537; as of today, 3.9.54.9373 is available but not worth installing.