w*s 发帖数: 7227 | 1 hi everyone,
we designed embedded board, running basic linux,
no fancy stuff (e.g. network manager).
it has 2 ethernet ports: eth0, eth1
1. plugin cable to eth1, restart board.
it comes back, eth1 is alive, i can ping it.
2. move the cable from eth1 to eth0,
run "udhcpc --reties 4 -n -q -i eth0"
ifconfig shows eth0 now has a valid ip addr, also it's UP.
3. but i cannot ping eth0
4. if i start with eth0, can ping eth0.
move to eth1, then cannot ping eth1.
i'm not familiar with network... 阅读全帖 |
|
w*s 发帖数: 7227 | 2 i have
ifconfig eth0 10.50.181.126 up
in /etc/init.d/rcS
in /etc/network/interfaces i have
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.50.181.125
netmask 255.255.252.0
network 10.50.181.0
broadcast 10.50.183.255
gateway 10.50.1.254
but after booting, ip is 10.50.181.126.
If i comment out that line in rcS, then it takes ip from DHCP.
Linux 2.6.38.8 #23 Fri Oct 7 17:36:54 EDT 2011 armv5tejl GNU
/Linux
any hints pls ? |
|
w*s 发帖数: 7227 | 3 totally lost,
1. set /etc/init.d/rcS to use static ip by using
ifconfig eth0 10.50.181.126 up
2. reboot, yes it's using static
3. ifdown eth0; ifup eth0
it's taking /etc/network/interfaces
and using dhcp now
why it's not using dhcp from reboot ? |
|
w*s 发帖数: 7227 | 4 it does look like arp issue.
but in this embedded arm board,
we use busybox for arp,
if i do "arp -d ipaddr -i eth0", the entry is still there.
if i do "ifconfig eth0 down", the entry will be gone.
but this is too heavy.
any suggestions why "arp -d" is not working ?
is this the bug in the ethernet driver ?
(btw, i tried to move cable in linux desktop, the arp entry
is gone as soon as i move the cable.) |
|
w*s 发帖数: 7227 | 5 so eth0 and eth1 ate up after reboot,
i unplug eth1,
from host i can still ping eth1.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.50.180.0 * 255.255.252.0 U 0 0 0 eth0
10.50.180.0 * 255.255.252.0 U 0 0 0 eth1
default 10.50.183.254 0.0.0.0 UG 0 0 0 eth0
is this legal ? |
|
w*s 发帖数: 7227 | 6 Linux bos2mistevens 2.6.32-33-generic-pae #70-Ubuntu SMP Thu Jul 7 22:51:12
UTC 2011 i686 GNU/Linux
# cat /etc/network/interfaces
auto lo
iface lo inet loopback
# ifconfig
eth0 Link encap:Ethernet HWaddr bc:30:5b:d0:08:0a
inet addr:10.50.180.36 Bcast:10.50.183.255 Mask:255.255.252.0
....
i can ping yahoo.
so
1. why eth0 is not listed in /etc/network/interface ?
2. if i want to change to static ip, will above the right file to change ? |
|
w*s 发帖数: 7227 | 7 【 以下文字转载自 Programming 讨论区 】
发信人: wds (净洗前尘,从头再来), 信区: Programming
标 题: shall i call system("ifconfig eth0 ... up") or write my own code ?
发信站: BBS 未名空间站 (Sun Oct 14 11:20:17 2012, 美东)
for a complicated linux application,
we need to configure ethernet port a lot,
e.g. bring up the port, for 2 ways,
1. system("ifconfig eth0 ... up")
2. write a c function
which way is better ? any concerns for method 1 ? |
|
w*s 发帖数: 7227 | 8 for a complicated linux application,
we need to configure ethernet port a lot,
e.g. bring up the port, for 2 ways,
1. system("ifconfig eth0 ... up")
2. write a c function
which way is better ? any concerns for method 1 ? |
|
w*s 发帖数: 7227 | 9 Hi I have pc1(10.50.181.51),
it's running uml (192.117.1.6),
and pc2 (10.50.181.67)
pc1 and pc2 can ping each other,
pc1 and uml can ping each other.
But uml cannot reach pc2.
Any hints pls ?
---- pc1 ----
#netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
192.117.1.6.sta * 255.255.255.255 UH 0 0 0
tap0
10.50.180.0 * 255.255.252.0 U 0 0 0
eth0
link-local * ... 阅读全帖 |
|
W*****x 发帖数: 684 | 10 background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
maximum_width 400
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color lightgray
default_shade_color red
default_outline_color green
alignment top_right
gap_x 20
gap_y 40
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_s... 阅读全帖 |
|
s*******4 发帖数: 164 | 11 server的log如下:
Jun 26 12:12:46 os dhcpd: Listening on LPF/eth0/00:22:6b:bb:bb:df/192.168.1/
24
Jun 26 12:12:46 os dhcpd: Sending on LPF/eth0/00:22:6b:bb:bb:df/192.168.1/
24
Jun 26 12:12:46 os dhcpd: Sending on Socket/fallback/fallback-net
Jun 26 12:13:03 os dhcpd: DHCPDISCOVER from 00:1e:8c:33:db:ff via eth0
Jun 26 12:13:04 os dhcpd: DHCPOFFER on 192.168.1.254 to 00:1e:8c:33:db:ff
via eth0
Jun 26 12:13:07 os dhcpd: DHCPREQUEST for 192.168.1.254 (192.168.1.1) from
00:1e:8c:33:db:ff via eth0
Ju |
|
w*s 发帖数: 7227 | 12 hi, under /etc/sysconfig/network-scripts/ifcfg-eth0
case 1, eth0 is up after reboot
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.50.181.135
NETMASK=255.255.252.0
case 2, eth0 is NOT up after reboot
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
DHCP server is running fine, any hints pls ? |
|
w*s 发帖数: 7227 | 13 ubuntu, no NetworkManager,
anyone knows how to get rid of one of the default gateway ?
thx !
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.50.180.0 * 255.255.252.0 U 0 0 0 eth0
10.50.180.0 * 255.255.252.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 1000 0 0 eth0
default 10.50.183.254 0.0.0.0 UG 100 0 0 eth1
default 10.50.183.254 0.0.0.0 UG 100 0 0 eth0
my /etc/network/interfaces is simple
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto et... 阅读全帖 |
|
b***i 发帖数: 3043 | 14 有一个类,TCPServer{
public: TCPServer(asio::io_service& io_service, const tcp::endpoint& listen_
endpoint){...}
private:
asio::io_service& io_service_;
asio::ip::tcp::acceptor acceptor_;
TCPListener listener_;
};
这个类是boost的一个例子。我的代码需要三个变量,放在TCPServerManager里面,为
简单起见,我定义三个static变量。
TCPServerManager{
static TCPServer eth0, eth1, wifi;
static void start(){...}
};
那么,在start里面,我根据boost的例子,用TCPServer s(io_service, listen_
endpoint);定义了一个变量。怎么把这个变量变成我的eth0,eth1, wifi呢?
在定义eth0的那个地方,需要的listen_endpoint还没有好,就... 阅读全帖 |
|
w*s 发帖数: 7227 | 15 # udhcpc --help
BusyBox v1.18.4 (2011-09-06 10:46:51 EDT) multi-call binary.
Hi, for some reason i cannot renew the lease.
root# udhcpc -i eth0 -s ./udhcpc.script -p eth0.pid -b
yes i got the ip address etc.
in udhcpc.script i put echos in the beginning so i know it get called
now since udhcpc is up running for eth0, i do this,
root# cat eth0.pid, i get 869
root# /bin/kill -SIGUSR1 869
nothing happened, no print from udhcpc.script
what did i do wrong pls ?
do i have files missing ? |
|
w*s 发帖数: 7227 | 16 hi i have eth0 and eth1,both static ip.
eth0 is not plugged in initially.
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
0.0.0.0 10.50.183.254 0.0.0.0 UG 0 0 0 eth1
10.50.180.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
then i plugin eth0,
#route add default gw 10.50.183.254 eth0
#route: SIOCADDRT: Network is unreachable
how should i fix it ?
thanks ! |
|
s*******d 发帖数: 59 | 17 不知道eth0:0之类的别名能不能满足你的要求?
比如eth0 - 192.168.1.1
eth0:0 - 192.168.1.2
eth0:1 - 192.168.1.3
然后创建socket时候,bind一下本地ip。
关于ip alias,google “Linux IP Alias” |
|
b***i 发帖数: 3043 | 18 Arm Linux, Xilinx Zynq
两个网卡,eth0, eth1,eth0这边接Win 7, eth1这边接Win 8
我的程序需要监听eth0 port A和eth1 port B,如果有connect的需要,就同意,并且
开始通信,从来不主动跟外部通信。两边需要并行通讯。Win7 和Win8这两个网络是不
通的,也不需要通过ARM Linux来接通。
问,eth0和eth1是否两个都可以一样IP地址?Win7, Win8是否可以一样的IP地址?假定
以太网卡地址完全不同。
好比,我在朝鲜和韩国边界有个店铺,里面两个电话,一个只能通朝鲜,一个只能通韩
国,假定朝鲜和韩国互不通话,也不能通过我的店铺通话。我的店铺只接电话,不主动
打电话。这时,我的朝鲜号码和韩国号码可以相同,不产生问题。 店铺里可以两个人
同时接电话。 |
|
N**********d 发帖数: 9292 | 19 例如
#ifconfig eth0 down
#ifconfig eth0 hw ether 00:11:22:33:44:55
#ifconfig eht0 up
如果有无线网卡,将eth0换成无线网卡名字
#表示需要有root权限 |
|
l****8 发帖数: 77 | 20 我用一台ubuntu8.04双网卡(eth0, eth1)作gateway(用firestarter设置的ICS),另
一台vista通过它上网。
vista----------->eth1, eth0------------>internet
现在有一个问题,当eth0,eth1都开时,两台机器都无法访问citicards.com这个网站(
只有这个网站无法访问!)。必须ifdown eth1后才能用ubuntu访问。请问为什么会这
样?怎样查找原因?
没开ICS之前访问citicards.com一切正常。 |
|
h********r 发帖数: 821 | 21 刚买了个烂便宜的笔记本,因为上面已经有了vista,就装了个双系统vista+ubuntu9.
04。所有一切看起来都顺利,但是进ubuntu了以后发现有线网不行(无线网反而没什么
问题)。修改/etc/network/interfaces文件成
auto eth0
iface eth0 inet dhcp
后重启网络,出现
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
错误。用ifconfig看eth0设备的IP是一个内部IP,169.×××。
用lshw命令看pci设备发现网卡的制造商能被正确认出来(我的网卡是Atheros AR8132
),但是product下面仍然是制造商的名字;前面network下还写了个什么unclaimed。
到此我已经完全没辙了,不知道这个问题到底是因何而起,自己该怎么办。请高手给指
条路,不胜感激啊!
另本人不坚持用ubuntu,如果别的linux发行版可能没有这个网络问题,只要能和vista
并存,那也行(最好没有启动问题)。 |
|
f**c 发帖数: 791 | 22 fc10
eth0 固定IP, 上网用
eth1 连一router (DHCP),想和别的电脑作局域网传data,不需要上网
用network service 管理。 发现要是先activate eth0, then eth1, 主机上不了网。
先 activate eth1 then eth0,则上网没问题。还没有试局域网通不通。
请问需要什么别的设置吗??
太感谢拉 |
|
l********0 发帖数: 283 | 23 有一台服务器A
操作系统采用CentOS 5.3,双网卡,一个网卡连接外网,一个网卡连接本地switch
这个switch没有外网连接,只是连接了A和另外12台服务器节点(想配置为cluster系统)
eth0:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=34:13:8B:F5:D7:26
ONBOOT=yes
TYPE=Ethernet
eth1:
DEVICE=eth1
BOOTPROTO=none
HWADDR=03:18:5B:F8:D3:07
ONBOOT=no
NETMASK=255.255.254.0
IPADDR=192.168.1.13
GATEWAY=192.168.1.254
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
每个网卡单独启用的使用,都分别是好的
但是如果同时启动的话,eth0就失去作用,就是说不能连接外网,但是eth1可以用,可
以连接那12台节点
我想让他们同时起作用,可以连接外网,又可以连接另外12台节点
该如何配置?
这个问题已经困扰我好几天了,期待大家的帮助,谢谢 |
|
x****s 发帖数: 921 | 24 看你开了新贴问iptable,不知道是不是关于这个,我diff 了一下我的iptables,setup
openvpn时加了这些
*nat
-A POSTROUTING -o eth0 -j MASQUERADE
*filter
-A FORWARD -i eth0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i tun0 -o eth0 -j ACCEPT
HTH
个能互相ping通.这之后就可以 verify routing table, try internet access (use
IP only first.),if not work, fix iptable. |
|
r****t 发帖数: 10904 | 25 应该是个常见问题了,一直不知道咋办:
A acts as the gateway, eth0 internal, eth1 external.
B is a web server behind A.
能做 DNAT 让 internet 访问到 B, 但是和 B 在同一个子网的机器却没法
直接用 A 的 IP 访问 B, 因为一些原因不想改内部 DNS, 我现在用
iptables -t nat -A PREROUTING -s $INTERNAL_NET -i eth0 -d IP_A -j DNAT --to-
dest IP_B
iptables -t nat -A POSTROUTING -s IP_B -o eth0 -d $INTERNAL_NET -j SNAT --to
-source IP_A
不能工作,请问我该怎么办? |
|
n**n 发帖数: 626 | 26 1) Can we use TCPServer* eth0 instead of TCPServer eth0? then maybe we can
create and record heap memory object in start() after "listen_endpoint". I
don't see the need of keeping a TCPServer object inside.
2) Why should we use static member TCPServer eth0 here? Are there many
TCPServerManager objects? |
|
c******n 发帖数: 4965 | 27 【 以下文字转载自 Linux 讨论区 】
发信人: creation (yy), 信区: Linux
标 题: a network question --- bridge
发信站: BBS 未名空间站 (Sun Feb 18 01:32:11 2007)
I setup a bridge, inserted eth0 into it, from Dom0,
then from DomU, I ifconfig eth0 up,
both have IPs on 192.168.0.xx
I have both eth0 arp enabled,
but when I ping against each other, no packets received,
what can be the cause of the problem ?
Thanks |
|
i*********e 发帖数: 90 | 28 I tried to connect to laptops (A and B with ad-hoc mode. I've tried two days
and so far there is no progress
I use mandriva linux and madwifi driver. For my experiment, it's an old
version Madwifi (before 2005) but known to work. I use
#iwconfig eth0 mode ad-hoc channel 11 essid network channel 11 key off
#ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up
The other laptop is the same setup with IP 192.168.1.3.
When I type iwconfig and ifconfig, all the setups are correct but I can't
ping each o |
|
p**i 发帖数: 688 | 29 NAS一天24小时中有多少时间是在做backup? 我的NAS有个realtek gigabit NIC, 用
r8169
driver, turn off gigabit speed能省2W电. 我的cron job里让它在工作日1AM
/usr/sbin/ethtool -s eth0 autoneg off speed 100
然后6PM
/usr/sbin/ethtool -s eth0 autoneg on speed 1000
http://www.lesswatts.org/tips/ethernet.php |
|
w*******e 发帖数: 285 | 30 不好意思,我不幸把我们家的router brick了。我的先去ddwrt照着我的型号下载了
belkin f5d7230-4 v2000的micro和micro-plus版本的firmware,开始我只用tftp
flash了micro版本的firmware,一切顺利只是有线网不支持,然后我就参照链接
http://www.dd-wrt.com/wiki/index.php/Belkin_F5D7230-4_v2xxx_and_Lower用telnet运行了如下的script
nvram set lan_ifnames="vlan0 eth1"
nvram set port0vlans=1
nvram set remote_management=1
nvram set lan_ifname="br0"
nvram set wan_ifname=eth0
nvram set wan_ifnames=eth0
nvram commit
reboot
结果有线网还是不能dhcp,就算手动设置ip也不行,只能通过无线网连上router,也无
法从cable modem分配到地址。后来我看mic |
|
c********l 发帖数: 8138 | 31 神座,如果在DHCP上,可以顺利上网,可以用LAN进行SSH登录
但如果修改/etc/rc.conf
把原来的DHCP的设置:
interface=eth0
address=
netmask=
broadcast=
gateway=
改为:
interface=eth0
address=192.168.1.14
netmask=255.255.255.0
broadcast=192.168.1.255
gateway=192.168.1.1
并重启神座,
系统则无法连上lan(路由器的connected列表里无法看见神由)
(另:我已经重复确认过,address, netmask, gateway这些参数设置都是正确的)
请问是怎么回事? |
|
s*****e 发帖数: 33 | 32
Does PC1 really need two NIC? If PC1 is using Linux, is one NIC enough by
using
alias? e.g., eth0:0 for Modem connection; eth0:1 for local connection?
Thanks. |
|
z**r 发帖数: 17771 | 33 that's how it's supposed to work using dhcp.
you need to use static network configuration, edit /etc/network/interfaces,
change "iface eth0 inet dhcp" to "iface eth0 inet static", then add
corresponding information like IP address, net mask, gateway, ....
After this is done, then it's time to modify /etc/resolv.conf to add your
own DNS infor |
|
b**r 发帖数: 352 | 34 ubuntu server 9.04
两个网口
#more /etc/nework/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.200
netmask 255.255.255.0
auto eth1
iface eth1 inet static
address 173.11.129.99
netmask 255.255.255.240
gateway 173.11.129.110
问题是可以ping 192.168.1.*, 但是ping 173.11.129.110时Destination Host
Unreachable
#route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
173.11.129.96 0.0.0.0 255.255.25 |
|
I*a 发帖数: 297 | 35 uninstall network-manager, network-manager-gnome(or kde)
then edit
/etc/network/interfaces
add
auto eth0
iface eth0 inet static
(for example)
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.254 |
|
a*******e 发帖数: 3021 | 36 好,多谢多谢
这个得等网络又抽风的时候测
update:
好像不行哦
刚才又抽风,
ping -c 5 -M do -s 1400 www.shnoop.com
ping: unknown host www.shnoop.com
这个根本ping不通,因为域名解释不了,其实这个网站2分钟前俺刚打开过。
俺还用了dnsmasq好像也霉气作用
俺的dns server是156.154.70.1, dnsmasq设置需要在resolv.conf里面加nameserver
127.0.0.1
more /etc/sysconfig/network-scripts/ifcfg-eth0
# Networking Interface
DEVICE=eth0
HWADDR=00:23:54:BB:90:30
ONBOOT=no
IPADDR=192.168.1.10
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=192.168.1.1
DNS1=156.154.70.1
IPV6INIT=no
USERCTL=no
PREFIX |
|
f**c 发帖数: 791 | 37 多谢,能详细说说吗?
网上说在/etc/sysconfig/network里面加GATEWAY=...但是restart network service后
加的东西就没有了,只剩下:
NETWORKING=yes
HOSTNAME=***
/etc/sysconfig下有两个目录:networking, network-scripts
其中ifcfg-eth0,和ifcfg-eth1分别为:
DEVICE=eth0
BOOTPROTO=none
HWADDR=***
IPV6INIT=no
IPV6_AUTOCONF=no
ONBOOT=yes
DNS1=***
DNS2=***
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
NM_CONTROLLED=no
NETMASK=255.255.255.0
IPADDR=***
GATEWAY=***
TYPE=Ethernet
DEVICE=eth1
HWADDR=***
BOOTPROTO=dhcp
ONBOOT=no
USERCTL=no
PEERDNS=yes
IPV6INIT=no
NM_CONTROL |
|
y*******a 发帖数: 218 | 38 Hi,
I met a boring problem.My pc with Windows XP is blocked by Cablevision,
maybe because of some virus in my system. I have reinstalled my system (
change to Ubuntu). But I still could not access to internet :(.
I knew some method like that if I change the mac address of my laptop, maybe
Cablevision does not know, so then I could access to internet.
But I do not know how to do this?
I found some information like:
sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 00:aa:bb:cc:ee:ff (new mac add |
|
l********0 发帖数: 283 | 39 问题看起来已经解决,
解决方法是,修改eth1的配置:BOOTPROTO=static;去掉GATEWAY=192.168.1.254
现在通过服务器A既可以上外网,又可以连接其他12台服务器
输出结果是:
192.168.0.0/24 dev eth1 proto kernel scope link src 192.168.0.13
128.169.4.0/23 dev eth0 proto kernel scope link src 128.169.4.74
169.254.0.0/16 dev eth1 scope link
default via 128.169.4.1 dev eth0
请帮我看看,还有什么错误吗?
非常感谢! |
|
v*****r 发帖数: 1119 | 40 OS: RedHat 5.3服务器上装了两个网卡:eth0 and eth1. eth0 是连internet的
public interface, eth1 是 private interface (for cluster nodes
interconnections). 按要求防火墙需要打开 (iptables), 在 RedHat 4 (or under 4
) 下面,通常我都是打开防火墙(enable iptables),同时设 eth1 为 "Trusted Device
“ to bypass firewall. (在 Security Level and Firewall 窗口里,以上设置可一
步完成。)发现在 RedHat 5 里的 Security Level and Firewall 窗口下,没有了 “
Trusted Devices" 的选项,google 了一下,也没找到答案。我的问题是:1. RedHat
5 里,如何设置 eth1 为 “Trusted Device" to bypass iptables firewall.2. 如果
GUI window |
|
xt 发帖数: 17532 | 41 AMDx64, VM Ware,计划开20个VM,其中
10个装RHEL5。
网卡是INTEL 82545EM Gigabit Ethernet Controller(Copper)
static IP,DNS, Routing等等都设置正确,但是网络
总是不通。
打开Network Configuration里的Device,发现里面有两个网卡,
一个eth0(Intel EtherExpress/1000 gigabit),一个
就是正确的Intel 82545EM,在peth0.
如果我把eth0删除(因为不存在),然后重新创建Ethernet
Device,再activate,发现连gateway都ping不到,如果重新
启动,再打开ethernet device看,发现我删除的那个Intel EtherExpress/1000
又回来的,而且被设置成了Device的网卡。这个Intel
EtherExpress实际上在机器里还不存在。
谁知道这是什么问题? |
|
T**S 发帖数: 319 | 42 the problem is you don't know which interface the packet will use to send
out. you may have eth0, eth1, eth0:10, eth2:1, etc., in your system, and it
is the rotuting table decide the correct one.
also getsockname() or getpeername() doesn't apply either. |
|
s**h 发帖数: 1889 | 43 哦,我对这个不熟,就是抄了一个规则觉得用得挺方便:
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m
recent --set --name SSH
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m
recent --update --seconds 600 --hitcount 6 --rttl --name SSH -j DROP
这个是限制一定时间内新建ssh连接不得超过一定数目的。我也不知道是哪个模块,呵
呵。 |
|
c******n 发帖数: 4965 | 44 for all traffic going to remote box 1.2.3.4 : 8888
I want to route the traffic to localhost : 8888, and I already have a ssh
tunnel
listening on localhost : 8888 to route the traffic to 1.2.3.4:8888
Thanks
I did something like this: but doesn't seem to work
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx
--dport 8888 -j DNAT --to 192.168.0.2:80
/sbin/iptables -A FORWARD -p tcp -i eth0 -d 192.168.0.2 --dport 80 -j ACCEPT |
|
k*****u 发帖数: 1688 | 45 用有线网卡的ifconfig的结果
eth0 Link encap:Ethernet HWaddr 00:0c:29:a0:34:e4
inet addr:138.23.191.192 Bcast:138.23.191.255 Mask:255.255.254.0
inet6 addr: fe80::20c:29ff:fea0:34e4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4571 errors:0 dropped:0 overruns:0 frame:0
TX packets:1446 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2107491 (2.1 MB) TX bytes:246723 (246... 阅读全帖 |
|
w*s 发帖数: 7227 | 46 问个傻问题,pc2的netstat是这样,
10.50.180.0 * 255.255.252.0 U 0 0 0 eth0
default 10.50.183.254 0.0.0.0 UG 0 0 0 eth0
这里*是什么意思?
10.50.18.0这一类地址在自己的network里,不需要gateway就可以直接通过
switch连接到?比如pc1?
如果我从pc2去www.yahoo.com,那才需要第二行的10.50.183.254,从那里访问外部网
络。
我的背景是写c程序,炒股票和打餐馆,对网络不通。
谢谢各位大侠! |
|