File: 32_mail.py

package info (click to toggle)
pyroman 0.5.0~alpha1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 400 kB
  • sloc: python: 1,653; xml: 88; sh: 59; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 510 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
This is an example configuration for a mail server.
"""
# a really simple host definition
add_host(
	name="mail",
	ip="10.100.1.1",
	iface="dmz"
)
# and offering a whole set of services with just one statement.
allow(
	client="ANY DMZ INT",
	server="mail",
	service="mail www ssh ping"
)

# But we need to setup a NAT for this host
# This is a bidirection nat, i.e. this host will use the .79
# IP for outgoing connections, too.
add_nat(
	client="ANY INT",
	server="mail",
	ip="12.34.56.79",
	dir="both"
)