LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Thread Tools
Old 03-10-2004, 05:34 PM   #1
Neodymium
LQ Newbie
 
Registered: Jan 2004
Location: UK
Distribution: Slackware 9.1
Posts: 7
Thanked: 0
Router with multiple public IPs


[Log in to get rid of this advertisement]
Hey there,

I've recently got a block of 8 IPs from my ISP. I'm looking to use some of these IPs on another machine of mine, which will no longer be using NAT, and thus publically accessible via the newly aquired IP addresses.

For ease of presenting my problem, I've constructed a diagram to show my current and proposed setup.

It can be viewed here: http://www.mytheril.com/misc/files/images/setup.gif



My ISP provided me with the following information in an email:
Code:
Assigned IP Address Range	82.133.31.40 - 82.133.31.47
Router IP (Default Gateway)	82.133.31.41
Useable IP Address Range	82.133.31.42 - 82.133.31.46
Netmask				255.255.255.248

Currently, when I connect to the Internet (via a BeWan ADSL PCI ST modem, under slackware) I am assigned my static IP via DHCP:

Code:
ppp0      Link encap:Point-to-Point Protocol
          inet addr:82.133.95.126  P-t-P:81.6.205.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1550  Metric:1
          RX packets:16439 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16095 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:6347625 (6.0 Mb)  TX bytes:1857122 (1.7 Mb)

My friend has a ADSL modem/router combo which assigns public IP addresses to the computers connected to it, and that's basically what I want to achieve with Linux. I'm not sure how common this function is, or what the proper terminology for it is (bridging?), maybe someone could shed some light on that also


Thanks!


(ps. I already searched Google and the forums here, with no resolution (atleast understandable by me).
Neodymium is offline     Reply With Quote
Old 04-13-2004, 07:39 PM   #2
Neodymium
LQ Newbie
 
Registered: Jan 2004
Location: UK
Distribution: Slackware 9.1
Posts: 7
Thanked: 0

Original Poster
Alright, I now have everything sorted!

Here's how it goes:

1. echo "1" > /proc/sys/net/ipv4/ip_forward

2. [initiate connection to inet if not already done]

3. Set IP on eth0 (or whatever interface goes to your switch/rest of network) to one in your block (ie. 82.133.31.41).

4. Set the IPs on your other machines to the ones assigned to you by your ISP.


That's it.

I then wrote myself a new iptables script and had to apply some of my existing rules to my FORWARD chain. Here's an example:

$IPTABLES -A FORWARD -p tcp -d 82.133.31.42 --dport 139 -j DROP



Hope that's of some use to someone
Neodymium is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
linux as3 working as router with 2 public IPs rajeshdogra Linux - Networking 1 07-18-2005 08:53 AM
Linux as a router but for multiple public IPs gnirtS Linux - Networking 8 03-07-2005 04:08 PM
Public IPs behind router Buzer Linux - Networking 2 09-20-2003 02:36 PM
Linux firewall that supports USB ADSL & multiple public IPs? Smoothieu Linux - Security 1 08-21-2002 07:23 PM
Multiple NIC cards - public and private IPs harryinjapan Linux - Networking 2 12-02-2001 05:25 AM


All times are GMT -5. The time now is 10:54 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration