LinuxQuestions.org
Review your favorite Linux distribution.
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 09-07-2003, 11:25 AM   #1
roguefoxx
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
Slackware 9 - [IP MASQ]


Hello. I really really need some help here.. I'll try to explain it the best that I possibly can, but take in mind, I'm a real n00b. I built a custom router,and I'm trying to get it to.. well. route. :P

I'm running Slackware 9.

I have a PPP connection, called "ppp0". And I have 2 ethernet cards. I already have the ethernet cards ips set up, so that's all set..

IFCONFIG:

Quote:
root@router:/home/cody_harders# ifconfig
eth0 Link encap:Ethernet HWaddr 00:40:95:0A:90:79
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:3440 (3.3 Kb)
Interrupt:10 Base address:0xdf00

eth1 Link encap:Ethernet HWaddr 00:40:95:0A:8B:2B
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0xfe00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1336 (1.3 Kb) TX bytes:1336 (1.3 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:67.234.138.205 P-t-P:67.234.128.4 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1524 Metric:1
RX packets:1074 errors:0 dropped:0 overruns:0 frame:0
TX packets:1286 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:451512 (440.9 Kb) TX bytes:170314 (166.3 Kb)

root@router:/home/cody_harders#
Now, I have tried many scripts for IPMASQ.. but I JUST can't get it to work.. could someone write a script for me (Remember I'm an idiot) to share
"ppp0" to "eth0" and "eth1" using the IPs in the ifconfig I posted above.. please.. I've been struggling with this for days..

Thanks, Cody.
 
Old 09-07-2003, 11:39 AM   #2
curdanet
LQ Newbie
 
Registered: Sep 2003
Distribution: Slackware 9.0
Posts: 8

Rep: Reputation: 0
ptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
 
Old 09-07-2003, 11:41 AM   #3
roguefoxx
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Original Poster
Rep: Reputation: 0
That's all? Neat. I'll go try it
 
Old 09-07-2003, 11:48 AM   #4
curdanet
LQ Newbie
 
Registered: Sep 2003
Distribution: Slackware 9.0
Posts: 8

Rep: Reputation: 0
is
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward

i ommited the "i"
excuse me

Carlos
 
Old 09-07-2003, 11:52 AM   #5
roguefoxx
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Heh. Doesn't work either way. My Windows box which is hooked up via crossover cable isn't receiving internet, it's plugged into eth0, and has it's gateway set to 192.168.0.1 .. It can SSH into my router and such, just no internet.
 
Old 09-07-2003, 11:59 AM   #6
curdanet
LQ Newbie
 
Registered: Sep 2003
Distribution: Slackware 9.0
Posts: 8

Rep: Reputation: 0
Excuse me...
I didn't understand well what did you tried to do...
I guess your configuration is INTERNET<-->LINUXBOX<--->WINDOWSBOX
is this correct?
What are you using to access to your ISP, ADSL? or Dialup MODEM

I need this to help you

Carlos
 
Old 09-07-2003, 12:02 PM   #7
roguefoxx
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Alright .

My box is acting as a switch/router. It has dialup modem in it, connected to my ISP, therefore generating the connection "ppp0".

I have 2 ethernet cards. One to connect to my dad's computer (XP), and one to connect to my computer (XP).. I'm trying to share ppp0 to them. Up above, I have the IPS set for my ethernet cards.. so that's what I need the iptable entries to go by..

P.S: Sorry if my last sentence didn't make sense, I'm really n00by. :P
 
Old 09-07-2003, 12:04 PM   #8
curdanet
LQ Newbie
 
Registered: Sep 2003
Distribution: Slackware 9.0
Posts: 8

Rep: Reputation: 0
Try this:
ping 216.109.118.69
if it works the problem is that you didn't setup your DNS information in your windows box. It should be the same of your ISP.

If it doesn't tell me what program are you using to connect to your isp in your Linux
 
Old 09-07-2003, 02:08 PM   #9
roguefoxx
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Woo! Thank you so much! It's fixed! All of it! Woohoo!!
 
  


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
IP MASQ help alec77 Linux - Newbie 5 03-22-2005 10:15 AM
linux masq server to linux masq server VPN rob_roman23 Linux - Networking 0 09-13-2003 09:54 AM
Slackware, DHCPD, IP MASQ phishman3579 Linux - Networking 11 06-08-2003 11:21 PM
firewall script run at boot -> no masq, rerun manually -> masq worx Griffon26 Linux - Networking 2 06-24-2002 03:17 AM
ip masq. dilberim82 Linux - Networking 8 07-24-2001 08:01 PM

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

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