Toon posts:

firewall rules voor webserver met beheer

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo, ik heb hier een webserver op 192.168.1.1 te draaien met daarop SSH2 voor SFTP uploads.
Daarvoor staat een dual NIC Ubuntu server met daarop iptables an ufw.
Ik ben de beveiliging aan het plannen en mijn plan is het volgende. Mijn vraag is, gaat dit werken? Voor SSH2 port 22, wil ik van buitenaf naar poort 4500 verbinden, vandaar die DNAT op TCP 4500. Poort 443 ga ik niet gebruiken.
Voor auto updates op de webserver heb ik port 80 en 53 naar buiten opstaan. Port 22 is om de firewall zelf te beheren.

Inbound (from WAN):
- Allow TCP port 443 from all source IP’s (0.0.0.0)
- Allow TCP port 4500 from all source IP’s (0.0.0.0)
- Allow TCP port 22 from all source IP’s (0.0.0.0) (remote management of the firewall)
- Deny all traffic from everywhere.

Outbound (from LAN):
- Allow TCP port 80 all NEW connections from 192.168.1.1 (for updating)
- Allow UDP port 53 from 192.168.1.1 (for the DNS client)
- Deny all NEW connections from all source IP’s (0.0.0.0).
- Allow all ESTABLISHED connections to all source IP’s (0.0.0.0).

DNAT:
- Forward traffic incoming at WAN on TCP port 4500 to IP address 192.168.1.1 at TCP port 22
- Forward traffic incoming at WAN on TCP port 443 to IP address 192.168.1.1 at TCP port 443


Ok, dit hierboven heb ik nu... moet ik met iptables eigenlijk wel die bovenste 2 allows ingeven (TCP 443 en 4500) aangezien ik die via DNAT naar binnen forward?
DNS heb ik nu doorgelaten, ongeacht de connection state, aangezien dit UDP is. Klopt dit zo?

Verwijderd

Topicstarter
niemand hier?