LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 11-10-2003, 02:29 PM   #1
Paul Woodhouse
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Rep: Reputation: 0
Question How do I get iptables to redirect my default gateway address?


Hi

I have a Red Hat Linux pc set up, dual booting with 2003. Now, 2003 connects to internet over dsl no probs. Linux is another matter. I set it up as follows.

My pcs all have an address of
IP: 217.155.x.x.
SUB: 255.255.255.248
DG: 10.0.0.138

Router:
IP: 10.0.0.138
SUB: 255.255.255.248

yeah yeah i know, terrible setup! its the only way i could get this crap router to work with my 8ip block from isp though. because the routers address is assinged to the ppp0a port. it won't let me assign it to eth0 as well, rediculous situation i think you'll agree. let be go though it again.

As far as i can see linux must calculate the subnet for the default gateway as 255.0.0.0. and therefore can't access it, windows i assume uses the subnet for the configured ip address, and therefore doesn't have a problem.

Is there a solution to make linux work in this setup? It was suggestted in my orginal thread that i need to use iptables. Is this correct? if so how do i proceed?

Thanks

Paul
 
Old 11-11-2003, 01:29 AM   #2
SWAT
Member
 
Registered: Aug 2003
Posts: 36

Rep: Reputation: 15
Why don't you just install DHCPd?
And at the DHPDd config file you can add a line like "option-router 10.0.0.138"
OR you have to add the gateway-address by hand
 
Old 11-11-2003, 08:20 AM   #3
Paul Woodhouse
LQ Newbie
 
Registered: Nov 2003
Posts: 6

Original Poster
Rep: Reputation: 0
sorry i'm a bit of a linux newbie! how would i go about doing this.

Thanks

Paul
 
Old 11-11-2003, 08:52 AM   #4
SWAT
Member
 
Registered: Aug 2003
Posts: 36

Rep: Reputation: 15
Well.. I'm a newbie too (I just already solved this question)
You'll have to get DHCP from http://www.isc.org/products/DHCP/
Just install it and edit the DHCPd.conf file in /etc/dhcpd.conf
AND READ THE MANUALS/HOWTO'S/README'S!!!! ==> www.tldp.org

# Example /etc/dhcpd.conf.... You'll have to edit this yourself
ddns-update-style ad-hoc;
default-lease-time 1200;
max-lease-time 9200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers ******;
#option domain-name "mydomain.org";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
}
 
  


Reply



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
How do I set the ip address for eth0, eth1 and the default gateway? abefroman SUSE / openSUSE 5 05-19-2005 04:15 AM
Universal default gateway address resolution otisthegbs Linux - Networking 2 07-09-2004 02:28 AM
Obtaining a default gateway IP address from a Win2K workstation Linh Programming 1 02-20-2004 02:55 AM
odd default gateway address, uses addr ~.ip.~ whatzat? piratebiter Linux - Networking 0 09-07-2003 07:06 PM
e-mail address redirect? WorldBuilder Linux - Networking 6 05-18-2003 09:15 PM

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

All times are GMT -5. The time now is 04:27 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