Changes between Version 6 and Version 7 of BridgingAndRouting


Ignore:
Timestamp:
04/12/12 08:38:38 (12 years ago)
Author:
David Sommerseth
Comment:

Added info about sysctl

Legend:

Unmodified
Added
Removed
Modified
  • BridgingAndRouting

    v6 v7  
    8383What happens with OpenVPN is that it accepts OpenVPN clients from eth1, OpenVPN will decrypt the data and put it to the tun0 interface, and the iptables and routing engine will pick up that traffic again, filter/masquerade it and send it further to eth0 or eth1, depending on the routing table.  When the routing engine sends traffic destined for the tun0 network, OpenVPN will pick it up, encrypt it and send it out on eth1, towards the proper OpenVPN client.
    8484
     85First we need to be sure that IP forwarding is enabled.  Very often this is disabled by default.  This is done by running the following command line as root:
     86
     87{{{
     88    [root@host ~] # sysctl -w net.ipv4.ip_forward=1
     89    net.ipv4.ip_forward = 1
     90    [root@host ~] #
     91}}}
     92
     93This change is only temporary, so if you reboot your box this will be reset back to the default value.  To make this change persistent you need to modify ''/etc/sysctl.conf''.  In this file you should have a line stating:
     94
     95{{{
     96    net.ipv4.ip_forward = 1
     97}}}
     98
    8599So, lets look at the iptables rules required for this to work.
    86100