LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 07-12-2003, 01:54 PM   #1
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Rep: Reputation: 30
adding IPs


Id like to learn how to add IPs... this is my current setup 4.7-RELEASE FreeBSD 4.7-RELEASE #0

edit

Last edited by DigiCrime; 07-12-2003 at 07:26 PM.
 
Old 07-12-2003, 06:43 PM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Are those IP addresses intended for machines on your LAN?

If so, I have an idea (though I am not a network guru and never did this before): what if adding the surplus IP addresses to em0, as IP aliases, then redirect them to your internal machines by natd?

You can add IP aliases in rc.conf like this:
ifconfig_em0_alias0="inet 192.168.0.1 netmask 255.255.255.255"
For redirection, see man natd.

Last edited by J_Szucs; 07-12-2003 at 07:30 PM.
 
Old 07-12-2003, 06:46 PM   #3
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
these ips are intended for a webserver, static IPs and I have more then one to add
 
Old 07-12-2003, 06:48 PM   #4
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Are those IP addresses intended for machines on your LAN?

If so, I have an idea (though I am not a network guru and never did this before): what if adding the surplus IP addresses to em0, as IP aliases, then redirect them to your internal machines by natd?

You can add IP aliases in rc.conf like this:
ifconfig_em0_alias0="inet 192.168.0.1 netmask 255.255.255.255"
For redirection, see man natd.

Last edited by J_Szucs; 07-12-2003 at 07:25 PM.
 
Old 07-12-2003, 06:55 PM   #5
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Sorry for the doublepost, I struggle a lot with my new installation of opera browser, and, I did not have time to fix it.

So, if you will use all those those IP addresses for a web server on a machine, then you need to use IP aliases. You can add any number of IP aliases to a NIC (alias0, alias1, alias2, etc.).
Do it as I mentioned above.

Last edited by J_Szucs; 07-12-2003 at 06:58 PM.
 
Old 07-12-2003, 06:58 PM   #6
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Thats ok

So each one has to look like this

ifconfig_em0_alias0="inet 65.125.xxxx netmask 255.255.255.255"
ifconfig_em0_alias0="inet 65.125.xxxx netmask 255.255.255.255"
ifconfig_em0_alias0="inet 65.125xxx netmask 255.255.255.255"

etc etc?

Last edited by DigiCrime; 07-12-2003 at 07:25 PM.
 
Old 07-12-2003, 07:00 PM   #7
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
No, do it like this:

ifconfig_em0_alias0="inet 192.168.0.1 netmask 255.255.255.255"
ifconfig_em0_alias1="inet 192.168.0.2 netmask 255.255.255.255"
ifconfig_em0_alias2="inet 192.168.0.3 netmask 255.255.255.255"

Last edited by J_Szucs; 07-12-2003 at 07:28 PM.
 
Old 07-12-2003, 07:02 PM   #8
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
ok ty
 
Old 07-12-2003, 07:23 PM   #9
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Just one last note:
If those IP addresses were your real IP addresses, then you had better edit your previous posts and change them to some other arbitrary IP address. (I do the same with my posts in this thread).

For security reasons, it is not a good practice to post your actual IP address at any forum.
 
Old 07-12-2003, 07:26 PM   #10
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
edited, yes their real
 
Old 07-14-2003, 01:58 PM   #11
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Just being curious. Worked?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding virtual ips to fedora 3 linchat Linux - Networking 2 09-17-2005 07:31 PM
Adding Multiple Ips to 1 Interface kemplej Slackware 1 12-27-2004 09:18 AM
how to define a specific range of IPs and/or multiple IPs in an iptables rule?... TheHellsMaster Linux - Security 9 09-20-2004 10:06 AM
Adding multiple static IPs to one NIC digihlp Linux - Networking 2 06-26-2003 07:13 PM
adding ips to red hat 7.1 server antigravityboy Linux - Networking 1 08-27-2001 08:49 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration