DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th June 2008
hamba hamba is offline
Fdisk Soldier
 
Join Date: Apr 2008
Posts: 71
Thanked 5 Times in 4 Posts
Default ip alias confusion

Hi,

On my FreeBSD 6.3 firewall I have 10 external ips.
I'm using ip alias and I can access the system perfectly with them and pf redirects all the traffic correctly to the assigned hosts. The problem I have is that I want my email server to use only one of the 10 ips when sending an email.

At the moment when I'm sending an email it will cycle trough all the ips on the external interface. each new connection made has a new ip, this counts for everything even http, ftp and ssh.

Code:
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=8<VLAN_MTU>
        inet 80.xx.yy.aa netmask 0xffffff00 broadcast 80.xx.yy.zzz
        inet 80.xx.yy.ab netmask 0xffffffff broadcast 80.xx.yy.ab
        inet 80.xx.yy.ac netmask 0xffffffff broadcast 80.xx.yy.ac
<snip>
        inet 80.xx.yy.aj netmask 0xffffffff broadcast 80.xx.yy.aj
        ether 00:11:6b:93:a4:31
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
In pf I'm redirecting all the traffic that goes to 80.xx.yy.ac to the email server on the internal network 192.168.3.4. So all traffic connecting from the internet to 80.xx.yy.ac sees the email server but when the email server connects to the internet its cycles trough all the ips from 80.xx.yy.aa to 80.xx.yy.aj and back again.

How can I get the email server on the internal network ip 192.168.3.4 to only use 80.xx.yy.ac for all its traffic and no other server my use that ip?

Thanks
hamba
Reply With Quote
  #2   (View Single Post)  
Old 4th June 2008
osman osman is offline
Real Name: osman
New User
 
Join Date: May 2008
Location: Lahore, Pakistan
Posts: 9
Thanked 0 Times in 0 Posts
Default

nat on rl0 inet from 192.168.3.4 to any -> 80.xx.yy.ac

verify using "pfctl -sn"

When we define interface it uses round robin method and load balances new sessions using all assigned ip addresses on that interface.

Last edited by osman; 4th June 2008 at 07:02 PM.
Reply With Quote
  #3   (View Single Post)  
Old 5th June 2008
hamba hamba is offline
Fdisk Soldier
 
Join Date: Apr 2008
Posts: 71
Thanked 5 Times in 4 Posts
Default

Thanks,

I've added that to pf and then I also had to add this to postfix smtp_bind_address = 192.168.3.4.
Its all working just the way I want it now

Thanks again
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing MAC address to an alias interface? DNAeon FreeBSD General 6 20th January 2009 04:48 PM
Mounting NAS as apache alias directory Yuka FreeBSD General 7 18th July 2008 02:58 PM
Install confusion delboy FreeBSD Ports and Packages 2 25th May 2008 09:20 PM


All times are GMT. The time now is 12:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick