[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with Masquerading and Ip tables

On Thu, Jul 26, 2001 at 01:13:02AM +0200, Daniel Mashao wrote:
> Hi 
> Can anybody please help
> I am trying to setup a network and getting frustrated by the day.
> I am dialling in from home (HOME) into my work (WORK)
> using PPP. I have set a kernel at work with all the 
> IP stuff in the kernel. Stuff like NAT and so on.
> Once I am logged on I can telnet from HOME into WORK using 
> or (which is my WORK). I have tried
> all the advices but still my HOME cannot go past WORK. In particular 
> when I run route -n on WORK I get the following

telnet = spawn of satan

use ssh!

> Kernel IP routing table
> Destination   Gateway       Genmask         Flags Metric Ref    Use Iface
> UH    0      0        0 ppp0
>   U     0      0        0 eth0
>         UG    0      0        0 eth0
> on HOME I get
> % /sbin/route -n
> Kernel IP routing table
> Destination   Gateway       Genmask         Flags Metric Ref    Use Iface
> UH    0      0        1 ppp0
>       U     0      0        0 lo
>         UG    0      0        6 ppp0
> I have tried on WORK
> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> as adviced my experts but still nothing changes. I cannot even access
> or which is my WORK gateway.

okay. if you get your /etc/network/interfaces set up properly,
then a simple "ipmasq" will get you up and running (at least
that's all i needed) -- "apt-get install ipmasq" to get it.

mine looks like this:

	# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

	# The loopback interface
	iface lo inet loopback

	# local net
	iface eth0 inet static

	# interface to the wwweb
	iface eth1 inet static
		address MY.REAL.IP.HERE
		network MY.REAL.IP.0
		broadcast MY.REAL.IP.255
		gateway MY.ISP.ADDR.HERE

for yours i'd say your gateway would be the static address of
your machine at work.

when ifconfig shows what it should, "ipmasq" and check your
routing tables -- try a traceroute to see what happens.

it's been a while since i messed with ppp/dialup (i'm on a
cablemode/microwave transmitter), tho, so there may be other
pointers i'm missing...

DEBIAN NEWBIE TIP #7 from Will Trillich <will@serensoft.com>
Wondering what COMMANDS you have at your disposal? Try pressing
the TAB key at the command line. For example, "apt<TAB>" will
show you all the commands that start with "apt". (This is called
"completion" if you want to look it up in your shell's manpage.)
(Different implementions have the <TAB> completion set up
differently -- you may need to press <TAB> twice.)

Also see http://newbieDoc.sourceForge.net/ ...

Reply to: