What command do I use?

What command do I use?

Post by David Knap » Sun, 27 May 2001 22:47:23

What command do I use to get packets from eth0 to route through my ppp0


David Knapp

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


What command do I use?

Post by Dean Thompso » Mon, 28 May 2001 00:11:32


Quote:> What command do I use to get packets from eth0 to route through my ppp0
> interface?

It sounds like you want to do packet forwarding.  Make sure that the packet
forwarding is enabled in your /etc/sysctl.conf file or your
/etc/sysconfig/network file (both files are used in the Mandrake/Redhat

You will then need to issue an instruction like:

/sbin/ipchains -A forward -i ppp0 -s -d -j MASQ

This will forward all packets coming in from the network which is
on your eth0 interface to be masqueraded out the ppp0 interface.  If you are
just passing raw packets without the need for masquerading then you change the
-j MASQ to the -j ACCEPT statement.

If you use iptables rather than ipchains, you example would look something
like this:

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

See ya

Dean Thompson


| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |


1. Translating ARP commands from linux syntax to dos command prompt

Hi all!

Can someone please help me translating following ARP commands to dos,
so I can run then from command prompt in win98.



route add -net $FGATEWAY netmask dev $DEVICE
route add default gw $FGATEWAY dev $DEVICE

route del default gw $FGATEWAY dev $DEVICE
route del -net $FGATEWAY netmask dev $DEVICE

Thanks a lot and greetings......Sam

Sent via Deja.com http://www.deja.com/
Before you buy.

2. C++ CGI Problem

3. Using Time Command With Command That Redirects Output.

4. searching....

5. problem with executing commands from within the shell using a command string.

6. Cannot login!!!!!

7. Problems using command where command contains single quote.

8. Q: 2GB file limit in stable linux - treatment in development linux

9. From field incorrect when using Mail command from Command Line

10. HELP: Connectivity between DOS/DOS and DOS/Linux

11. diff among echo a>f; command<f; echo $a|command; command << $a; EOF

12. DOS-style UNIX command line shell

13. Will DOS Format Command Eat Linux Partition?