Ubuntu 网关服务器配置
1.设置Linux内核支持ip数据包的转发
echo "1" > /proc/sys/net/ipv4/ip_forward
or
vi /etc/sysctl.conf net.ipv4.ip_forward=1
2.配置双IP
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.6.xx
netmask 255.255.255.0
gateway 192.168.6.1
dns-nameservers 8.8.8.8
auto eth0:0
iface eth0:0 inet static
address 10.2.0.1
netmask 255.255.255.0
3.添加IP伪装规则
iptables -t nat -A POSTROUTING -S 192.168.1.0/24 -O eth1 -j MASQUERADE
Ubuntu 网关服务器配置的更多相关文章
- 【linux】ubuntu stmp服务器配置
来源:http://blog.itpub.net/786540/viewspace-1002077/ sudo apt-get install sendmail(其中已经包含了sendmail-bin ...
- ubuntu apache2服务器配置
把django开发好的项目部署到apache2服务器. 记录我的配置过程. apache,django,mod_wsgi,python版本如下.不同版本大同小异. ii apache2 2.2.22- ...
- [Ubuntu] Ubuntu DNS服务器配置
服务器IP:10.68.19.61 操作系统:Ubuntu 13.04 DNS程序:Bind9 测试域名:mycloud.com 目标IP:10.68.19.134 配置步骤 1.安装BIND9程序包 ...
- Ubuntu 16 服务器配置PHP+MySQL+Apache环境
一.获取软件包资源并进行资源更新 apt是Ubuntu上默认的软件包管理器,使用它可以很容易进行各种软件安装,而且会自动帮你安装可能需要的依赖关系. 另一个强大的软件管理工具是 dpkg,可以用于安装 ...
- ubuntu web服务器配置
1.安装Apachesudo apt-get install apache2 查看状态: service apache2 status/start/stop/restartWeb目录: /var/ww ...
- iptables之路由网关共享上网/端口映射
linux-A 主机配置eth0即可: [root@linux-A ~]# ifconfig eth0|sed -n '2p' inet addr:192.168.20.3 Bcast:192.168 ...
- 虚拟机与ubuntu系统的安装与基础操作
1.虚拟机的下载: 常见的虚拟机软件有:VMware VirtuaIBOX Virtual PC 等. 这里主要介绍VMware ,VMware目前已经有很多个版本,可以根据个人情况进行选择.安 ...
- linux服务之iptables与firewalld
开发语言: 服务器端:在内核中实现,无守护程序 客户端:一般是cli界面下的iptables命令 相关包:iptables-1.4.7-11.el6.x86_64 netfilter/iptables ...
- iptables的实战整理
一.iptables使用场景: 内网情况下使用:在大并发的情况下不要开iptables否则影响性能 二.iptables出现下面的问题: 在yewufa ...
随机推荐
- leetcode515
/** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNo ...
- Git 联机版
简介: 之前研究了 Git 单机版 ( 单兵作战 ),今天来研究一下 Git 联机版 ( 团队协作 )! GitHub 是一个开源的代码托管平台,可以分享自己的代码到该平台上,让大家参与开发或供大家使 ...
- JSON 新感
1,如何解析复杂JSON 选择fastJson 用起来简单方便,前提必须是标准的JSON: 例子: paraArray = "[" + paraArray + "]&qu ...
- Oracle 与 MySQL 批量添加
Oracle: <update id="createNew" statementType="STATEMENT" parameterType=" ...
- 【原】Coursera—Andrew Ng机器学习—课程笔记 Lecture 17—Large Scale Machine Learning 大规模机器学习
Lecture17 Large Scale Machine Learning大规模机器学习 17.1 大型数据集的学习 Learning With Large Datasets 如果有一个低方差的模型 ...
- 解决svn Key usage violation in certificate has been detected
ubuntu系统 #!/bin/shecho "This script will reconfigure subversion to work with certs correctly.&q ...
- 使用Jenkins集成和自动化打包资料
1.手把手教你利用Jenkins持续集成iOS项目 http://www.jianshu.com/p/41ecb06ae95f 2.Jenkins+ Xcode+ 蒲公英 实现IOS自动化打包和分发 ...
- mybatis中使用懒加载实现一对多复杂查询
1.包结构 2.pom配置 <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&qu ...
- word 标题序号
设置标题的序号. 1>设置二级标题的序号 步骤一: 步骤二: 步骤三: 步骤四: 2>设置三级标题的序号 程序员的基础教程:菜鸟程序员
- linux操作系统下,怎么使用kill按照PID一次杀死多个进程
1.ps -ef | grep firefox | grep -v grep | cut -c 9-15 | xargs kill -s 9 说明:“grep firefox”的输出结果是,所有含有关 ...