PDA

View Full Version : pf loadbalance and 3G connection


none
November 3rd, 2009, 00:42
hail,

I read the pf manual from OpenBSD's site, and figured out I must have the gw IP to use in the route-to rule. But when I connect using the 3G, I get none:

tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
inet xxx.xxx.xxx.xxx --> 127.0.0.1 netmask 0xffffff00
Opened by PID 2845

phoenix# route -n get default
route to: default
destination: default
mask: default
interface: tun0
flags: <UP,DONE,STATIC>
recvpipe sendpipe ssthresh rtt,msec mtu weight expire
0 0 0 0 1500 1 0

is there any way to use loadbalance, that is not another box just to connect ?

this box should have two tun if's, DSL and 3G.

thanks,

none

Orum
November 20th, 2009, 07:42
Your gateway should be at whatever is the opposite end of the tunnel. However, it's very strange to see an address in the localhost range on one end of a tunnel, or on anything other than a lo (loopback) interface for that matter.

none
November 20th, 2009, 08:01
I know, i got this surprised also when I first saw this. but it does work. well, I know I can't even test here as I can't get the remote end address :(

if anyone has any clue, please >)

none

vivek
November 20th, 2009, 13:10
Am I missing something here? I do not see your gateway ip? I mean how does it works? Can you ping outside?

none
November 21st, 2009, 05:33
Am I missing something here? I do not see your gateway ip? I mean how does it works? Can you ping outside?

it does work. but I have no gateway ip I can remember of. I don't have the modem here so I can't do it and post here.

I know that if I'm connected and run:

route add default -interface tun0

it works.

none

Eam404
December 22nd, 2009, 18:48
What does netstat -rn show?

none
December 22nd, 2009, 19:09
here it goes:

[root@harry ~]# netstat -rn
Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
default tun0 US 0 466376 tun0
10.12.0.0/22 link#1 U 2 2020491 em0
10.12.1.221 link#1 UHS 0 388 lo0
127.0.0.1 link#6 UH 0 171 lo0
my.inet.ip.add link#10 UHS 0 112 lo0

Internet6:
Destination Gateway Flags Netif Expire
::1 ::1 UH lo0
fe80::%lo0/64 link#6 U lo0
fe80::1%lo0 link#6 UHS lo0
ff01:6::/32 fe80::1%lo0 U lo0
ff02::%lo0/32 fe80::1%lo0 U lo0


hope it helps :)

thanks,

none