Okay, this is the sitution:
I've been trying to set up my OpenBSD box as a gateway for a few days now. But because im new to BSD I don't really know what to do.
So far, I've configured my rl0 and rl1 device so that I can access the internet from my OpenBSD box and access the OpenBSD box from my main box (Win XP). But I cant access the internet from my main box, meaning the comminication stops somewhere between the boxes.
This is what i've done so far:
I've added this in /etc/rc.conf:
Code:
#router
ifconfig_rl0="inet x.x.x.x netmask 255.255.192.0" # x.x.x.x jis my IP IP netmask is from my ISP
defaultrouter="84.255.192.1" # gateway IP of my ISP
ifconfig_rl1="inet 192.168.0.1 netmask 255.255.255.0"
gateway_enable="YES"
sshd_enable="YES"
I've made a file called hostname.rl1 undet /etc/ and in it i've written:
Code:
inet 192.168.0.1 255.255.255.0 NONE
I've added both DNS server in /etc/resolv.conf
I've uncommented the line "net.inet.ip.forwarding" and changed the value to 1.
These are my configs:
pf.conf
rc.conf
ifconfig
route
Any ideas?
UPDATE:
Added in /etc/pf.conf:
mainbox="192.168.0.2"
rdr on $ext_if proto tcp from any to any port 80 -> $mainbox
rdr on $ext_if proto tcp from any to any port 21 -> $mainbox
rdr on $ext_if proto tcp from any to any port 25 -> $mainbox
rdr on $ext_if proto tcp from any to any port 110 -> $mainbox