Re: Special configuration of DHCP, NAT
- From: Doug Carter <pilot@xxxxxxxxxxxxx>
- Date: Tue, 23 Oct 2007 18:48:26 GMT
On 2007-10-23, jens@xxxxxxxx <jens@xxxxxxxx> wrote:
Hi
My ISP provides me with 5 dynamic ip addresses.
I have 5+ computers connected today via a broadband router which means
I am just using 1 of my addresses.
I am now thinking about replacing the broadband router with my openbsd
box who is already handling my mail.
This is what I do at home with OpenBSD 4.1. Standard install. Running my web
site, mail server plus firewall to my LAN. OpenBSD DHCP's an address from the
DSL modem and NAT's the LAN. I use a combination of static IP address for
hosts plus bind and dhcpd.
I also make sure my one windoze box doesn't emit anything too nasty to the
Internet...
My /etc/pf.conf:
LAN = "fxp0"
WAN = "xl0"
icmp_types = "echoreq"
tcp_services = "{ ssh, http, https, smtp, imaps }"
MSports = "{ 135:139, 161, 389, 445, 593 }"
set skip on lo
scrub in on $WAN all
scrub out on $WAN all random-id
## NAT
nat on $WAN from $LAN:network to any -> ($WAN)
## FILTER RULES
block drop in all
block drop out all
## allow traffic out to Internet
pass out on $WAN proto tcp from any to any modulate state flags S/SA
pass out on $WAN proto { udp, icmp } from any to any
## allow pings
pass in on $WAN inet proto icmp from any to any icmp-type $icmp_types keep state
## watch for address spoofing
antispoof quick for { lo $LAN }
## allow LAN traffic
pass on $LAN
block on $LAN proto {udp, tcp} from any to any port $MSports
## allow specific server traffic, use TCP SYN Proxy
pass in on $WAN inet proto tcp from any to any \
port $tcp_services flags S/SA synproxy state
I also start up named and dhcpd per their man pages.
Hope this helps!
.
- Follow-Ups:
- Re: Special configuration of DHCP, NAT
- From: jens
- Re: Special configuration of DHCP, NAT
- References:
- Special configuration of DHCP, NAT
- From: jens
- Special configuration of DHCP, NAT
- Prev by Date: Special configuration of DHCP, NAT
- Next by Date: Sane and Plustek
- Previous by thread: Special configuration of DHCP, NAT
- Next by thread: Re: Special configuration of DHCP, NAT
- Index(es):
Relevant Pages
|