LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2004, 09:45 PM   #1
nldev
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
Question iptables and multiple IP adresses on intermet.


Hi!

My isp provides me with 4 static external ip addresses.

I am trying to set up a router using iptables.

I have 2 nics (1 internal and 1 external)

eth0 is external EXTIP1
eth0:1 is EXTIP2
eth0:2 is EXTIP3
eth0:3 is EXTIP4


eth1 is internal INTIP 192.168.0.1


By default i want it to rout all outgoing traffic (internal comunicting out) to route as EXTIP1.

And i also want some computers to be routerd as EXTIP2.EXTIP3.....

My problem is that iptables doesn't support IP alias.

I could solve this by buying 3 more NICs and a new switch, but that would be a little expensive.

And i want for example port 22 on EXTIP1 to be forwarded to 192.168.0.2.
port 22 on EXTIP2 shall be forwarded to 192.168.0.3

After searching the net i have found out that it's possible but i didn't find out how to do it.


Please help.


/Regards Niklas Lönn
 
Old 06-15-2004, 10:05 PM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
you should be able to achieve this using DNAT

Check www.netfilter.org documentation for more details.
 
Old 06-15-2004, 10:32 PM   #3
nldev
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Original Poster
Rep: Reputation: 0
how would that solve the ip alias problem?

/niklas
 
Old 06-15-2004, 11:10 PM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
http://www.tldp.org/HOWTO/IP-Alias/
 
  


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
Multiple MAC Adresses to one NIC? cjs500 Linux - Networking 8 04-29-2005 03:36 AM
multiple iptables exceptions? BoarderX Linux - Networking 1 09-23-2004 12:51 PM
iptables and dynamic ip adresses (use of a dyndns service) markus1982 Linux - Security 6 09-02-2004 09:27 AM
IPTables and multiple interfaces MaverickApollo Linux - Networking 7 12-28-2003 04:19 PM
IPtables and multiple IPs irclord Linux - Networking 3 09-03-2003 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:21 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration