Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Ip masquewrading ip address questions

I have a few questions about ip masquerading, and which ip addresses should be used.

I am looking through the Linux IP Masq mini HOWTO, and I don't really understand what the ip addresses should be set as. Although you obviously need to have a net connection (and registered IP address) to use this, and it should be on the linux box, I was wondering what should be set where. The HOWTO says to set the ip address of the linux box to 192.168.1.1... but if that is the ip address, how can it get on the net. My assigned ip should be 24.3.10.23.

In short, fill in these blanks: I put in what I have currently, which does not work.
Things to know:

Assigned ip: 24.3.10.23
Assigned gateway: 24.3.10.1
Assigned DNS: 24.3.0.33

Linux ip: <24.3.10.23>
Linux gateway: <24.3.10.1>
Linux DNS: <24.3.0.33>

Win95 box ip: <192.168.1.2>
Win95 box gateway: <24.3.10.23>
Win95 box DNS: <24.3.0.33>

Thats what I have now... is that incorrect? I cant ping the linux box.
0
edskee
Asked:
edskee
1 Solution
 
sauronCommented:
If you think about it, an IP masquerading box is, by definition, a router. A router has at least two interfaces, so you will (probably) have an ethernet card in your masquerading machine, which has the 192.168.1.1 ip address attached to it. Your assigned ip address will be the address of the internet-facing interface, usually a PPP-link.

So, linux machine:-

PPP interface IP: 24.3.10.23
Ethernet IP: 192.168.1.1
Nameserver: 24.3.0.33
Gateway: 24.3.10.1

Win95 box:-

Ethernet IP: 192.168.1.2
Nameserver: 24.3.0.33
Gateway: 192.168.1.1 ********IMPORTANT********

On your linux box, configure it's IP address as 192.168.1.1

In the file /etc/sysconfig/network, you might have something like:-
NETWORKING=yes
HOSTNAME=your.hostname
DOMAINNAME=your.domainname
GATEWAY=24.3.10.1
GATEWAYDEV=ppp0


and in /etc/sysconfig/network-scripts/ifcfg-eth0, you might have:-

DEVICE=eth0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes

Of course, I'm assuming your connection to the internet is a PPP link here, but the principles are the same, even if it isn't. The file locations are right for RedHat, I'm not sure about other distributions...
0
 
edskeeAuthor Commented:
Damn. I igured this out myselkf, and was coming on to delete my question and get my points refunded. You beat me to it. I'm up and running, thanks for the help anyway though :)

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now