I feel like I'm missing something painfully obvious, but I just can't
see it.



I have someone who just got ADSL connected and I talked them into
letting

me setup an obsd firewall. The adsl modem that the ISP sent only does

bridging (Netgear DM111) and although I got it all working, it feels
like an

awkward hack that will bite me in the ass later on if I don't do it
properly now.



If I set my external interface on the obsd box to dhcp, the adsl modem
gives it

the correct static IP  (103.113.194.79 mask 255.255.255.0) but no
default

gateway gets set.



If I logon to the adsl modems web interface, it gives me the following
details:

IP: 103.113.194.79

Gateway: 103.17.101.67



If I set these manually on the obsd box, it doesn't work as the default
gateway

isn't in my subnet.

Ie, IP:    103.113.194.79

Subnet 255.255.255.0

Gateway 103.17.101.67



The way that I did get it to work was manually setting the subnet mask

to 255.0.0.0. Now the default gateway is within my subnet and so it gets

used and at the moment, everything seems to be working ok, but this

feels like a dirty hack that will bite me later on.



Is there a better way to do this???





I can't see how a dmesg will help, but just in case.



OpenBSD 4.2 (GENERIC) #375: Tue Aug 28 10:38:44 MDT 2007

    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC

cpu0: Intel(R) Celeron(R) CPU 420 @ 1.60GHz ("GenuineIntel" 686-class)
1.60 GHz

cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,SSE3,MWAIT,DS-CPL,TM2,CX16,xT
PR

real mem  = 527265792 (502MB)

avail mem = 502185984 (478MB)

mainbus0 at root

bios0 at mainbus0: AT/286+ BIOS, date 05/28/07, BIOS32 rev. 0 @ 0xf0010,
SMBIOS rev. 2.4 @ 0xfcd70 (22 entries)

bios0: vendor American Megatrends Inc. version "P3.20" date 05/28/2007

apm0 at bios0: Power Management spec V1.2

apm0: battery life expectancy 0%

apm0: AC off, battery charge unknown, estimated 0:00 hours

apm0: flags 20102 dobusy 0 doidle 1

pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000

pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf4a80/192 (10 entries)

pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82801EB/ER LPC" rev
0x00)

pcibios0: PCI bus #1 is the last bus

bios0: ROM list: 0xc0000/0xa000!

cpu0 at mainbus0

pci0 at mainbus0 bus 0: configuration mode 1 (no bios)

pchb0 at pci0 dev 0 function 0 "Intel 82865G/PE/P CPU-I/0-1" rev 0x02

vga1 at pci0 dev 2 function 0 "Intel 82865G Video" rev 0x02: aperture at
0xf0000000, size 0x8000000

wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)

wsdisplay0: screen 1-5 added (80x25, vt100 emulation)

uhci0 at pci0 dev 29 function 0 "Intel 82801EB/ER USB" rev 0x02: irq 10

uhci1 at pci0 dev 29 function 1 "Intel 82801EB/ER USB" rev 0x02: irq 3

uhci2 at pci0 dev 29 function 2 "Intel 82801EB/ER USB" rev 0x02: irq 5

uhci3 at pci0 dev 29 function 3 "Intel 82801EB/ER USB" rev 0x02: irq 10

ehci0 at pci0 dev 29 function 7 "Intel 82801EB/ER USB2" rev 0x02: irq 11

usb0 at ehci0: USB revision 2.0

uhub0 at usb0: Intel EHCI root hub, rev 2.00/1.00, addr 1

ppb0 at pci0 dev 30 function 0 "Intel 82801BA AGP" rev 0xc2

pci1 at ppb0 bus 1

fxp0 at pci1 dev 1 function 0 "Intel 8255x" rev 0x0c, i82550: irq 11,
address 00:02:b3:99:a5:96

inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4

rl0 at pci1 dev 5 function 0 "Realtek 8139" rev 0x10: irq 11, address
00:19:66:41:a9:78

rlphy0 at rl0 phy 0: RTL internal PHY

ichpcib0 at pci0 dev 31 function 0 "Intel 82801EB/ER LPC" rev 0x02:
24-bit timer at 3579545Hz

pciide0 at pci0 dev 31 function 1 "Intel 82801EB/ER IDE" rev 0x02: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility

pciide0: channel 0 disabled (no drives)

pciide0: channel 1 disabled (no drives)

pciide1 at pci0 dev 31 function 2 "Intel 82801EB SATA" rev 0x02: DMA,
channel 0 configured to native-PCI, channel 1 configured to native-PCI

pciide1: using irq 5 for native-PCI interrupt

wd0 at pciide1 channel 0 drive 0: <WDC WD1200JD-00GBB0>

wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors

wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5

atapiscsi0 at pciide1 channel 1 drive 0

scsibus0 at atapiscsi0: 2 targets

cd0 at scsibus0 targ 0 lun 0: <TSSTcorp, CDDVDW SH-S203B, SB00> SCSI0
5/cdrom removable

cd0(pciide1:1:0): using PIO mode 4, Ultra-DMA mode 5

ichiic0 at pci0 dev 31 function 3 "Intel 82801EB/ER SMBus" rev 0x02: irq
10

iic0 at ichiic0

usb1 at uhci0: USB revision 1.0

uhub1 at usb1: Intel UHCI root hub, rev 1.00/1.00, addr 1

usb2 at uhci1: USB revision 1.0

uhub2 at usb2: Intel UHCI root hub, rev 1.00/1.00, addr 1

usb3 at uhci2: USB revision 1.0

uhub3 at usb3: Intel UHCI root hub, rev 1.00/1.00, addr 1

usb4 at uhci3: USB revision 1.0

uhub4 at usb4: Intel UHCI root hub, rev 1.00/1.00, addr 1

isa0 at ichpcib0

isadma0 at isa0

pckbc0 at isa0 port 0x60/5

pckbd0 at pckbc0 (kbd slot)

pckbc0: using irq 1 for kbd slot

wskbd0 at pckbd0: console keyboard, using wsdisplay0

pmsi0 at pckbc0 (aux slot)

pckbc0: using irq 12 for aux slot

wsmouse0 at pmsi0 mux 0

pcppi0 at isa0 port 0x61

midi0 at pcppi0: <PC speaker>

spkr0 at pcppi0

lpt0 at isa0 port 0x378/4 irq 7

lm0 at isa0 port 0x290/8: W83627EHF

npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16

pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo

fdc0 at isa0 port 0x3f0/6 irq 6 drq 2

biomask ef6d netmask ef6d ttymask ffef

pctr: 686-class user-level performance counters enabled

mtrr: Pentium Pro MTRR support

dkcsum: wd0 matches BIOS drive 0x80

root on wd0a swap on wd0b dump on wd0b

Reply via email to