[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 786
  • Last Modified:

Eathernet Bridging Running Script Bridge-Start

Hi

 Refer back to the Openvpn (Eathernet Bridging) Setup:
http://openvpn.net/index.php/documentation/miscellaneous/ethernet-bridging.html#linuxscript

On the Page It said: Now run the bridge-start script. It will create a persistent tap0 interface and bridge it with the active ethernet interface

How I can run this two scripts (Bridge-start,Bridge-Stop)?
0
mubama0n
Asked:
mubama0n
  • 5
  • 4
1 Solution
 
fosiul01Commented:
Hi ya

create a file bridge-start like this in any where but do this in /root directory

touch bridge-start

then past the script in their

then give permission to this script

chmod 755 bridge-start

then run this script like this  ./bridge-start

do the same for the other one
0
 
mubama0nAuthor Commented:
Ok , Can I put it in (/etc/init.d) and write this command (chmod 755 bridge-start)?
can you specify the root directory is it CD /root?
If I wnt to let this script (bridge-start) to operated after rebooting can you show me how I do this?

Regards
0
 
fosiul01Commented:
easy way to do this task is

insert the script in /etc/rd.cd/rc.local
so it will run at leaset once when system will boot

so edit rc.local file  , added the path of the script like thist  /root/bridge-start

so next time when system will boot , it will restart automaticaly


but i didnot understand , what you meant by this : can you specify the root directory is it CD /root?
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
mubama0nAuthor Commented:
I mean I didn't work before with this directory (/root) , Is it Required to put the script (bridge-start) on this directory (/root) or I can put it in another directory e.g.: /etc/openvpn or /etc/init.d?

Remeber that When i run this script I must write : (./bridge-start) , can i write it like this on (rc.local)?
Another question, If I want to run the following scripts on this sequence:
1-./bridge-start
2-start openvpn
3- stop openvpn
4-./bridge-stop

Can I put it also on (rc.local) to be started after booting?
0
 
fosiul01Commented:
its not required to put it in root directory. you an put any directory as long as you have full access to that directory.

if you want you can create /etc/openvpn and the place those bridge-start and bridge-stop .

if you want to run the script from command prompt then you will have to use ./bridge-start.

but when you will add that one in rc.local, you dont need to write ./bridge-start

as i said, just write the path of that file ( for /etc/openvpn/bridge-start) just write  /etc/openvpn/bridge-start

2-start openvpn  == if you would be able to add individual command in rc.local file,

but you will have to give it full restart command

suppose if i want to restrt httpd by rc.local i will write : service httpd start in rc.local

another way you would be able to add openvpn  to run after linux boot up like this : chckconfig openvpn on  ( if open vpn support chckconfig)

let me know if you need further explanation

0
 
mubama0nAuthor Commented:
Thanks for this Clarification I'm really appreciated , About the second question (scripts sequence) I don't know who is the file(script) that responsible for calling processes during boot so I thought that (rc.local)is the one , Any way I'm far away now from the Linux machine around (2)HRS from now I'll be near the machines and I'll let you know about the result.
0
 
fosiul01Commented:
if you have root access, then its fine. root will have everything on the process

do everything as root user.
0
 
mubama0nAuthor Commented:
The First line on (rc) file is :
PATH=/sibn:/bin:/usr....,etc
Shall I put the start-bridge statement after this line?
0
 
fosiul01Commented:
sorry my account was cancled for a while due to not close question properly!!!
anyway

yes,
insert after last line. [ path of the script as i said before ]
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now