centos7 pptp安装脚本,防火墙使用firewall

Centos7配置PPTP共享网络 一、检查是否支持PPTP 1、查看系统是否支持PPTP modprobe ppp-compress-18 && echo success #应该输出:success 2、是否开启TUN/TAP cat /dev/net/tun #应该输出:cat: /dev/net/tun: File descriptor in bad state 3、是否开启ppp cat /dev/ppp #应该输出:cat: /dev/ppp: No such device or address 如果环境 阅读详情
  1. #!/bin/bash  
  2. yum -y update  
  3. yum -y install epel-release  
  4. yum -y install firewalld net-tools ppp pptpd  
  5. # 开启内核转发  
  6. echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf  
  7. sysctl -p  
  8. #添加pptp的登录账号密码,账号是admin 密码admin888  
  9. echo 'admin * admin888 *' >> /etc/ppp/chap-secrets  
  10. #开启虚拟IP分配  
  11. cat >>/etc/pptpd.conf <<END  
  12. localip 192.168.2.1  
  13. remoteip 192.168.2.10-100  
  14. END  
  15. #添加 pptp 的DNS解析服务器 格式:ms-dns 8.8.8.8 ,ip改为你自己的可以了  
  16. cat >>/etc/ppp/options.pptpd <<END  
  17. # ms-dns 202.12.27.33  
  18. ms-dns 8.8.8.8  
  19. ms-dns 8.8.4.4  
  20. END  
  21. # Firewall 通过防火墙规则  
  22. ens=$(ls /etc/sysconfig/network-scripts/ | grep 'ifcfg-e.*[0-9]' | cut -d- -f2)  
  23. systemctl restart firewalld.service  
  24. systemctl enable firewalld.service  
  25. firewall-cmd --set-default-zone=public  
  26. firewall-cmd --add-interface=m=$ens  
  27. firewall-cmd --add-port=1723/tcp --permanent  
  28. firewall-cmd --add-masquerade --permanent  
  29. firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -i $ens -p gre -j ACCEPT  
  30. firewall-cmd --reload  
  31. #  
  32. cat > /etc/ppp/ip-up.local << END  
  33. /sbin/ifconfig $1 mtu 1400  
  34. END  
  35. chmod +x /etc/ppp/ip-up.local  
  36. systemctl restart pptpd.service  
  37. systemctl enable pptpd.service  
在Linux上创建你自己的虚拟专用网络:PPTP服务器配置步骤 当配置PPTP(Point-to-Point Tunneling Protocol)服务器时,首先要确保你的服务器上已经安装了PPTP服务器软件。通常,在CentOS上使用pptpd(PoPToP Point to Point Tunneling Server)软件包来配置PPTP服务器。以下是如何配置PPTP服务器的详细步骤:这里我们首先安装了 EPEL 仓库,因为pptpd可能在 EPEL 仓库中安装pptpd软件包。 阅读详情

相关推荐

服务器安全设置Centos7 防火墙firewall与iptables

一.>>>>>>启用centos7 iptables防火墙Centos7 防火墙firewall设置方法 我们Sinesafe在处理客户服务器Linux Centos7 64位系统里配置防火墙安全设置需要选择2种方案其中之一,最后选择了iptables防火墙。 因为在Centos 7版本里默认的防火墙是firewall,所以首先用firewall防...

网站安全资讯 1263

centos7 搭建windows内置PPTP v*n

centos7搭建pptp

jake8168的博客 788

CentOS7系统中关闭firewall,并使用iptables管理防火墙

在我们日常服务器管理中,经常会统一防火墙的管理形式,我们常用的是关闭iptables(centos6.X),使用脚本来管理防火墙。如果有的系统是centos7的话,就要同时关闭firewall防火墙了。 1.关闭系统默认的firewall防火墙 systemctl stop firewalld.service 关闭防火墙 systemctl disable firewalld.servic

linxi7的博客 2291

centos7-pptp-***脚本,用的是firewall 防火墙

#!/bin/bash # [$(id-u)!="0"]&&{echo"Error:Youmustberoottorunthisscript";exit1;} exportPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin #######...

weixin_33722405的博客 218

C语言获取硬件信息(CPU序列号,硬盘序列号,网卡IP、MAC地址、是否插入网线)

本文主要介绍Linux和Windows下使用C语言获取各种硬件信息,包括CPU序列号、硬盘序列号、网卡信息(包括网卡名字、IP地址、MAC地址、网卡是否插入网线等)。

叶落花枯的博客 9378

Proteus 8.17安装部署全指南:避坑、汉化与STM32库配置

Proteus是一款广泛用于单片机仿真与电路设计的EDA工具,其核心价值在于支持嵌入式系统原型验证与教学实践。Proteus 8.17版本重构了许可证机制(LIC Engine)、依赖环境(VC++ 2019/NET 4.8)及路径加载逻辑,导致传统安装方法失效。掌握正确安装部署流程,是保障原理图绘制、VSM仿真(如51/STM32/ESP32)及外设波形观测(OLED、SPI、ADC)稳定运行的前提。本文聚焦Windows平台下零失败安装路径选择、权限配置、汉化实施与高频器件(如STM32F103)元件库

weixin_33377602的博客 402

实验四 基于PPTP的远程VPN实现【网络安全】

实验四 基于PPTP的远程VPN实现【网络安全】

小心星的博客 3825

AR Tag 与 ROS:从基础部署到机器人视觉定位实战

本文详细介绍了AR Tag技术在ROS环境下的部署与应用,涵盖从基础原理到机器人视觉定位的实战技巧。通过分析AR Tag的特征提取、位姿解算等核心技术,结合ROS工具包`ar_track_alvar`的配置优化,帮助开发者实现高精度的视觉定位系统。文章还分享了深度相机配置、坐标转换及性能优化等实用经验,适用于仓储机器人、物流分拣等场景。

weixin_33146151的博客 181

centos7-pptp安装脚本,防火墙为默认的firewall

#!/bin/bash yum -y update yum -y install epel-release yum -y install firewalld net-tools ppp pptpd # echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf sysctl -p # echo 'wtm21 * 000000 *' >> /

随想LINUX的日常手记 4182

c\c++: Identifiers, modifier, qualifier, specifier, decorator; systemtap

文章目录参考英语含义在c、C++ 参考 c++ 标准 https://blog.youkuaiyun.com/tyronne/article/details/44016621 英语含义 modifier word or phrase that modifies (modify 2) another word or phrase 修饰语. qualifier (grammar) word, esp an adjective or adverb, that qualifies another word 修饰词; (尤指)形

mzhan017的博客 2427

SOMEIP协议--第三节[SOMEIP/SD](SD格式)

Entry和Option是SD报文中最重要的内容,是服务发现功能的承载。7.Minor Version是指当前服务的小版本号,可以配置,用于给用户区分当前服务的版本用的。注意:stop offer,stop subscribe,Subscribe Nack 这三条的TTL一定设为0,唯一和offer,subscribe,Subscribe的区别。Option用来辅助Entry实现其功能,是Entry携带的附加信息,作用上一般是用来告诉对端自己业务的ip和port信息,方便对端通过ip和port发送报文。

qq_41816308的博客 1338

Centos7 防火墙Firewall命令大全

Centos7 防火墙Firewall命令大全 1.安装Firewall命令 yum install firewalld firewalld-config 2.命令集 查看firewall版本 firewall-cmd --version 查看帮助 firewall-cmd --help 查看防火墙状态(是否开启) firewall-cmd --state 开启状态为running 关...

胖虎儿的博客 5838

ZYNQ Petalinux编译系统启动文件实战指南

本文提出的混合编译加速方案实测可将编译时间从45分钟缩短至18分钟,QSPI双启动方案已在工业控制领域成功应用。Xilinx官方UG1144文档(最新v2023.1版)正点原子《ZYNQ嵌入式开发实战》开源项目Meta-Petalinux(GitHub趋势项目)未来展望:随着Versal平台的普及,Petalinux将支持更多AI加速器原生驱动,值得持续关注。

QQ_778132974的博客 812

Centos7/8安装和使用防火墙firewall

CentOS7之后 , 系统已经推荐了firewall防火墙 , 而不是iptables 1、安装 yum install -y firewalld yum install -y firewall-config 2、配置 开启firewall服务 #重启firewalld服务(注意有个d) systemctl restart firewalld #设置开机自启动(注意有个d) systemctl enable firewalld 特别提醒: firewall 和 iptables冲突 , 需要禁用其中

weixin_48803304的博客 1478

Transformer实战(39)——多模态生成式Transformer

能够理解多种类型输入的模型被称为多模态模型。多模态学习是人工智能 (Artificial Intelligence, AI) 领域的重要研究方向之一,长期受到众多研究人员的关注。本节将介绍使用多模态模型的生成式 AI,包括文本到图像 (text-to-image) 和文本到音乐 (text-to-music) 的生成模型。将介绍 Stable Diffusion 及其工作原理,同时也将介绍 MusicGen 和 AudioGen 模型。

盼小辉丶的博客 2425

【新能源汽车测试工程师必看!DBC文件50条实战技巧,看懂这篇直接封神】

如果你是新能源汽车研发/测试工程师,还在为信号解析错误、报文找不到、DBC看不懂、实车故障复现不了头疼——那这篇文章,你一定要!在整车电控开发里,DBC = CAN总线的官方字典。没有DBC,报文就是一串乱码;读不懂DBC,测试寸步难行;用不好DBC,排查故障全靠猜。本文总结50条全网最实用、最贴近实车、最能解决问题的DBC技巧,从基础语法到新能源专用信号,从工具操作到故障排错,全部来自一线台架、实车、高压平台实战经验。不废话、不空谈、不玄学,全是能直接落地的硬货!

优快云-新能源汽车研发测试专业博主 1370

CentOS7防火墙管理firewall-cmd

启动CentOS/RHEL 7后,防火墙规则设置由firewalld服务进程默认管理。 一个叫做firewall-cmd的命令行客户端支持和这个守护进程通信以永久修改防火墙规则. 查看 firewall 状态 : # firewall-cmd --state # eg :running 查看 firewall 版本 : # firewall-cmd --version #eg : 0....

袁军伟的博客 3383

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

Centos7/8 安装和使用防火墙firewall

CentOS7之后 , 系统已经推荐了firewall防火墙 , 而不是iptables 1、安装 yum install -y firewalld yum install -y firewall-config 2、配置 开启firewall服务 #重启firewalld服务(注意有个d) systemctl restart firewalld #设置开机自启动(注意有个d) systemctl enable firewalld 特别提醒: firewall 和 iptables冲突 , 需要禁用其

hantoy的博客 5490

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

centos7中firewall防火墙命令详解

安装防火墙 yum install firewalld 开启防火墙 systemctl start firewalld.service 关闭防火墙 systemctl stop firewalld.service 开机自动启动 systemctl enable ...

wujing1_1的博客 18万+

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

Linux CentOS7 防火墙 firewall 安装 重启 管理端口 等命令

参考 http://www.5yun.org/10074.html http://linux.51yip.com/search/firewall-cmd https://blog.youkuaiyun.com/yexiaojiu1/article/details/80135994 一、检查是否已安装 并启用服务 Centos7默认安装了firewalld。先查看防火墙是否已经安装,是否启动:...

test 3751

Centos7 配置防火墙 firewall

从CentOS7开始,默认使用firewall来配置防火墙,没有安装iptables(旧版默认安装)

javry的专栏 3008

CentOS7的firewall和安装iptables

前言:CentOS7 的防火墙默认使用是firewall,而我们通常使用iptables; 本文记录了firewall基础的命令和iptables的安装和使用。   firewall部分: part1 : 服务命令 systemctl start firewalld#启动 systemctl status firewalld #查看运行状态 systemctl stop fi

MikeLC7的博客 5341

centos7 停止firewall 启用iptables防火墙

1、关闭firewall: systemctl stop firewalld.service     #停止firewall systemctl disable firewalld.service   #禁止firewall开机启动 2、安装iptables防火墙 yum install iptables-services      #安装 vi /etc/sysconfig/ipta...

zk_1325572803的博客 1065

CentOS7服务器的第一道屏障防火墙firewall的使用

防火墙是系统的第一道防线,其作用是防止非法用户的进入,是内部网和外部网(Internet)之间的保护屏障。在我们构建服务器应用的时候首先应该想到的是安全,不能让用户随意的获取服务器的资源甚至系统的用户数据。这种安全事件频频发生我们更应该注重安全,安全也是未来互联网行业必须重视的重中之重。 防火墙应用的现状 如果大家直接购买阿里云的ECS或者腾讯云的云服务器可能很少关注防火墙,DDoS攻击等问题...

Marswill 3585

linux7保存防火墙配置,Centos7 firewall防火墙常用配置

一、 Centos7和Centos6 防火墙的区别:使用的工具不一样了。Centos6 使用的是iptables,Centos7 使用的是filewalliptables 用于过滤数据包,属于网络层防火墙。firewall 能够允许哪些服务可用,那些端口可用...属于更高一层的防火墙。二、常用命令:vim /usr/lib/firewalld/services/ssh.xmlvim /usr/...

weixin_29002961的博客 1688

Centos7 Firewall防火墙基本配置

Centos7 firewall防火墙常用配置 一、 Centos7和Centos6 防火墙的区别: 使用的工具不一样了。Centos6 使用的是iptables,Centos7 使用的是filewall iptables 用于过滤数据包,属于网络层防火墙。 firewall 能够允许哪些服务可用,那些端口可用...属于更高一层的防火墙。 二、常用命令: vim /usr/lib/firewalld/services/ssh.xml vim /usr/lib/firewalld/services/ht

小白客 1025
上一篇: tar命令详解
下一篇: 国外主流空间,域名隐私
赔了命3000
博客等级 码龄9年 10粉丝 20原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值