Routing-en

From WikiDoc

You need two ethernet cards. eth0 is connected to internet eth1 is your local network.

internet (pppoe) -> eth0 (DHCP) -> eth1 (e.g. Gateway: 192.168.0.1 / e.g. Nameserver = Primary DNS): 213.191.92.84)

Do this for Server:

$ su
# echo "1" > /proc/sys/net/ipv4/ip_forward

If you have other internet connection e.g. neoconfig use neoconfig and not pppoe-setup.

# pppoe-setup 
  • eth0
  • Activate-on-demand: No
  • Primary DNS e.g.: 213.191.92.84
  • Secondary DNS e.g.: 213.191.74.12
  • Firewalling: NONE

You must config now your eth1 with netconfig or katelan

# katelan

For IP-Address type e.g. 192.168.0.1 and for Nameserver (= Primary DNS) type e.g. 213.191.92.84

# mousepad /etc/rc.d/rc.firewall
...
firewall_stop() {
if [ "$SAVE_ON_STOP" = "no" ]; then
firewall_save
fi
...

The following steps help you to config your firewall.

# echo "http://mitlox.republika.pl/kateos/pkgs/" >> EOF >> /etc/updateservers
# updateos -i firestarter
# firestarter

Wizard of firestarter help you to enable internet connection sharing and config a lot of firewall rules. If you don't like firestarter you can do this:

  • iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# /etc/rc.d/rc.firewall save

Do this for Client:

You must config your eth0 on the client side with netconfig or katelan

$ su
# katelan

For IP-Address type e.g. 192.168.0.3 and for Gateway (is the IP-Address of servers eth1) e.g. 192.168.0.1 Nameserver (= Primary DNS) e.g.: 213.191.92.84 .

--Xyz 22:23, 26 September 2007 (CEST)