Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Using Linux As A Gateway, Using Linux as a Gateway
mrm
post Mar 31 2004, 02:04 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 31-March 04
Member No.: 2,685



Could someone please help me? I have redHat9.0, 2 network cards and want to just linux as my gateway to the internet for my XP network. I am using webmin because i dont really know how to get around in linux. My linux box can surf the net but none of my XP boxs can get out. I can ping both network cards from my XP box. I have tried to go into route and gateways and set it up there with no luck. Do i need to do something else after the static route is set? or am i going about it all wrong? I have dhcp set for my external and static for internal. The reason i am doing this is cause i have 2 modems and 1 is already on my router.

Thanl you for any help smile.gif
Go to the top of the page
 
+Quote Post
Termina
post Mar 31 2004, 02:34 PM
Post #2


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



I'm probally wrong, but I think you'd do it like this:

Get Squid (proxy, there's a guide on this site how to install/set it up), and have your XP boxes connect to the internet through it (have your linux box accept connections from then with iptables).

Not sure of any of the specifics, seeing as how I've never done it myself. happy.gif

Here are some older threads that might help (and hey, you can always bring them alive again, *laughs*)

http://www.linuxhelp.ca/forums/index.php?a...t=2912&hl=squid

http://www.linuxhelp.ca/forums/index.php?a...t=3046&hl=squid


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
hughesjr
post Mar 31 2004, 08:33 PM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



The easiest thing to do is to use the script here:

IP Masq 2.4 stronger

You should be able to just copy and paste the script rc.firewall-2.4-stronger into gedit and save it as /etc/rc.d/rc.firewall

then:

make this (in the firewall script):

#IPTABLES=/sbin/iptables
IPTABLES=/usr/local/sbin/iptables


look like this:

IPTABLES=/sbin/iptables
#IPTABLES=/usr/local/sbin/iptables


Next, plug in the eth0 to the external - internet ... use DHCP for the eth0 setting in redhat-config-network

Plug in eth1 to the internel network hub .... If your internal network is 192.168.1.x you are set ... if it is something else (like 192.168.0.x), you will need to change the line (in /etc/rc.d/rc.firewall):

INTNET="192.168.0.0/24"
INTIP="192.168.0.1/32"


save /etc/rc.d/rc.firewall

Set eth1 ip addess statically via redhat-config-network to the IP you want ... in my example 192.168.0.1 (subnet mask 255.255.255.0) ... DO NOT SET A DEFAULT GATEWAY FOR ETH1.

INTNET is the internal network ... INTIP is the internal IP address for eth1.

Next, make /etc/rc.d/rc.firewall executable like this:

chmod 755 /etc/rc.d/rc.firewall

Then turn off iptables with this command:

/etc/init.d/iptables stop

then make iptables not start on startup ....

chkconfig --del iptables

then run /etc/rc.d/rc.firewall .... with this at the command line:

/etc/rc.d/rc.firewall

Set your XP machines to have their default gateway be the value you assigned to eth1 ... in my example 192.168.0.1 ... all the XP machines would need to have IP Addresses on the 192.168.0.x network (ie 192.168.0.2 to 192.168.0.254) and their default gateway would be 192.168.0.1.

If everything works, make /etc/rc.d/rc.firewall start on startup by editing the file:

/etc/rc.d/rc.local

and adding the line:

/etc/rc.d/rc.firewall

to the top of the file....

(all commands should be done in a terminal window as root).


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Corey
post Apr 1 2004, 10:58 AM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



And if you want something even easier, download and install IPKungFu, edit your /etc/ipkungfu/ipkungfu.conf to open or close your externel ports (the defaults should be fine with ssh open), and then run ipkungfu.

Of course, you should probably read the README file first smile.gif


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd October 2017 - 09:42 PM